Skip to content

Commit 380f888

Browse files
committed
docs: fix TypeScript declaration examples in string packages
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 2cf7f78 commit 380f888

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

lib/node_modules/@stdlib/string/base/docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ interface Namespace {
474474
* console.log( '%d: %s', index, value );
475475
* }
476476
*
477-
* forEach( 'Hello, World!', log );
477+
* ns.forEachRight( 'Hello, World!', log );
478478
*/
479479
forEachRight: typeof forEachRight;
480480

@@ -963,11 +963,11 @@ interface Namespace {
963963
*
964964
* var str = 'Oranges and lemons say the bells of St. Clement\'s';
965965
*
966-
* function ns.replacer( match, p1 ) {
966+
* function replacer( match, p1 ) {
967967
* return capitalize( p1 );
968968
* }
969969
*
970-
* var out = ns.replace( str, /([^\s]*)/gi, ns.replacer );
970+
* var out = ns.replace( str, /([^\s]*)/gi, replacer );
971971
* // returns 'Oranges And Lemons Say The Bells Of St. Clement\'s'
972972
*/
973973
replace: typeof replace;
@@ -1004,7 +1004,7 @@ interface Namespace {
10041004
*
10051005
* @example
10061006
* var out = ns.replaceAfter( 'beep boop', ' ', 'foo' , 5 );
1007-
* // returns 'beep foo'
1007+
* // returns 'beep boop'
10081008
*
10091009
* @example
10101010
* var out = ns.replaceAfter( 'beep boop beep baz', 'beep', 'foo' , 5 );
@@ -1083,7 +1083,7 @@ interface Namespace {
10831083
*
10841084
* @example
10851085
* var out = ns.replaceBefore( 'Hello World!', '', 'foo', 0 );
1086-
* // returns 'Hello world!'
1086+
* // returns 'Hello World!'
10871087
*
10881088
* @example
10891089
* var out = ns.replaceBefore( 'Hello World!', 'xyz', 'foo', 0 );

lib/node_modules/@stdlib/string/base/for-each-right/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type Callback<T> = Nullary<T> | Unary<T> | Binary<T> | Ternary<T>;
8383
* console.log( '%d: %s', index, value );
8484
* }
8585
*
86-
* forEach( 'Hello, World!', log );
86+
* forEachRight( 'Hello, World!', log );
8787
*/
8888
declare function forEachRight<T = unknown>( str: string, clbk: Callback<T>, thisArg?: ThisParameterType<Callback<T>> ): string;
8989

lib/node_modules/@stdlib/string/base/replace-after/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*
5151
* @example
5252
* var out = replaceAfter( 'beep boop', ' ', 'foo' , 5 );
53-
* // returns 'beep foo'
53+
* // returns 'beep boop'
5454
*
5555
* @example
5656
* var out = replaceAfter( 'beep boop beep baz', 'beep', 'foo' , 5 );

lib/node_modules/@stdlib/string/docs/types/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -869,11 +869,11 @@ interface Namespace {
869869
*
870870
* var str = 'Oranges and lemons say the bells of St. Clement\'s';
871871
*
872-
* function ns.replacer( match, p1 ) {
872+
* function replacer( match, p1 ) {
873873
* return capitalize( p1 );
874874
* }
875875
*
876-
* var out = ns.replace( str, /([^\s]*)/gi, ns.replacer);
876+
* var out = ns.replace( str, /([^\s]*)/gi, replacer);
877877
* // returns 'Oranges And Lemons Say The Bells Of St. Clement\'s'
878878
*/
879879
replace: typeof replace;
@@ -896,7 +896,7 @@ interface Namespace {
896896
*
897897
* @example
898898
* var out = ns.replaceBefore( 'Hello World!', '', 'foo' );
899-
* // returns 'Hello world!'
899+
* // returns 'Hello World!'
900900
*
901901
* @example
902902
* var out = ns.replaceBefore( 'Hello World!', 'xyz', 'foo' );
@@ -1259,15 +1259,15 @@ interface Namespace {
12591259
*
12601260
* @example
12611261
* var result = ns.toWellFormed( '\uDBFF' );
1262-
* // returns
1262+
* // returns '�'
12631263
*
12641264
* @example
12651265
* var result = ns.toWellFormed( '\uDBFFFF\uDBFF' );
1266-
* // returns �FF�
1266+
* // returns '�FF�'
12671267
*
12681268
* @example
12691269
* var result = ns.toWellFormed( '-5' );
1270-
* // returns -5
1270+
* // returns '-5'
12711271
*/
12721272
toWellFormed: typeof toWellFormed;
12731273

lib/node_modules/@stdlib/string/first/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ declare function first( str: string, n: number, options?: Options ): string;
7575
* var out = first( '🐶🐮🐷🐰🐸', {
7676
* 'mode': 'grapheme'
7777
* });
78-
* // returns '🐶🐮'
78+
* // returns '🐶'
7979
*/
8080
declare function first( str: string, options?: Options ): string;
8181

lib/node_modules/@stdlib/string/last/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ declare function last( str: string, n: number, options?: Options ): string;
7575
* var out = last( '🐶🐮🐷🐰🐸', {
7676
* 'mode': 'grapheme'
7777
* });
78-
* // returns '🐰🐸'
78+
* // returns '🐸'
7979
*/
8080
declare function last( str: string, options?: Options ): string;
8181

lib/node_modules/@stdlib/string/num-code-points/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* @example
4040
* var out = numCodePoints( 'अनुच्छेद' );
41-
* // returns 5
41+
* // returns 8
4242
*/
4343
declare function numCodePoints( str: string ): number;
4444

lib/node_modules/@stdlib/string/remove-last/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ declare function removeLast( str: string, n: number, options?: Options ): string
7474
* // returns 'last man standin'
7575
*
7676
* @example
77-
* var out = removeFirst( '🐶🐮🐷🐰🐸', {
77+
* var out = removeLast( '🐶🐮🐷🐰🐸', {
7878
* 'mode': 'grapheme'
7979
* });
8080
* // returns '🐶🐮🐷🐰'

lib/node_modules/@stdlib/string/replace-before/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
* @example
3838
* var out = replaceBefore( 'Hello World!', '', 'foo' );
39-
* // returns 'Hello world!'
39+
* // returns 'Hello World!'
4040
*
4141
* @example
4242
* var out = replaceBefore( 'Hello World!', 'xyz', 'foo' );

lib/node_modules/@stdlib/string/replace/docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
* var out = replace( str, /([^\s]*)/gi, replacer);
5353
* // returns 'Oranges And Lemons Say The Bells Of St. Clement\'s'
5454
*/
55-
declare function repeat( str: string, search: string | RegExp, newval: string | Function ): string;
55+
declare function replace( str: string, search: string | RegExp, newval: string | Function ): string;
5656

5757

5858
// EXPORTS //
5959

60-
export = repeat;
60+
export = replace;

0 commit comments

Comments
 (0)