From 1dd95b7294557b71172de03b08a7fc0c21a2f646 Mon Sep 17 00:00:00 2001 From: sagar7162 Date: Thu, 13 Nov 2025 14:38:25 +0530 Subject: [PATCH 1/4] feat: add `string/base/concat` --- 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: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - 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: passed - task: lint_license_headers status: passed --- --- .../@stdlib/string/base/concat/README.md | 110 ++++++++++++++++++ .../string/base/concat/benchmark/benchmark.js | 77 ++++++++++++ .../@stdlib/string/base/concat/docs/repl.txt | 23 ++++ .../string/base/concat/docs/types/index.d.ts | 37 ++++++ .../string/base/concat/docs/types/test.ts | 57 +++++++++ .../string/base/concat/examples/index.js | 41 +++++++ .../@stdlib/string/base/concat/lib/index.js | 40 +++++++ .../@stdlib/string/base/concat/lib/main.js | 41 +++++++ .../@stdlib/string/base/concat/package.json | 66 +++++++++++ .../@stdlib/string/base/concat/test/test.js | 62 ++++++++++ 10 files changed, 554 insertions(+) create mode 100644 lib/node_modules/@stdlib/string/base/concat/README.md create mode 100644 lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/string/base/concat/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/string/base/concat/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/string/base/concat/examples/index.js create mode 100644 lib/node_modules/@stdlib/string/base/concat/lib/index.js create mode 100644 lib/node_modules/@stdlib/string/base/concat/lib/main.js create mode 100644 lib/node_modules/@stdlib/string/base/concat/package.json create mode 100644 lib/node_modules/@stdlib/string/base/concat/test/test.js diff --git a/lib/node_modules/@stdlib/string/base/concat/README.md b/lib/node_modules/@stdlib/string/base/concat/README.md new file mode 100644 index 000000000000..25e4abe4e16e --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/README.md @@ -0,0 +1,110 @@ + + +# concat + +> Concatenate two strings. + +
+ +
+ + + +
+ +## Usage + +```javascript +var concat = require( '@stdlib/string/base/concat' ); +``` + +#### concat( str1, str2 ) + +Converts a string to concat. + +```javascript +var out = concat('beep', 'boop'); +// returns 'beepboop' +``` + +
+ + + +
+ +## Examples + + + +```javascript +var concat = require( '@stdlib/string/base/concat' ); + +var str = concat( 'beep', 'boop' ); +// returns 'beepboop' + +str = concat( 'foo', 'bar' ); +// returns 'foobar' + +str = concat( 'hello', 'world' ); +// returns 'helloworld' + +str = concat( '', 'abc' ); +// returns 'abc' + +str = concat( '123', '' ); +// returns '123' +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js b/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js new file mode 100644 index 000000000000..c32d814cb1e4 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js @@ -0,0 +1,77 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var pkg = require( './../package.json' ).name; +var concat = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var values1; + var values2; + var out; + var i; + + values1 = [ 'BEEP', 'FOO', 'HELLO' ]; + values2 = [ 'BOOP', 'BAR', 'WORLD' ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = concat( values1[ i % values1.length ], values2[ i % values2.length ] ); + if ( typeof out !== 'string' ) { + b.fail( 'should return a string' ); + } + } + b.toc(); + if ( !isString( out ) ) { + b.fail( 'should return a string' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg + '::builtin', function benchmark( b ) { + var values1; + var values2; + var out; + var i; + + values1 = [ 'BEEP', 'FOO', 'HELLO' ]; + values2 = [ 'BOOP', 'BAR', 'WORLD' ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = values1[ i % values1.length ].concat( values2[ i % values2.length ] ); + if ( typeof out !== 'string' ) { + b.fail( 'should return a string' ); + } + } + b.toc(); + if ( !isString( out ) ) { + b.fail( 'should return a string' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt b/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt new file mode 100644 index 000000000000..d7f59ce8bd05 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt @@ -0,0 +1,23 @@ + +{{alias}}( str1, str2 ) + Concatenates two strings. + + Parameters + ---------- + str1: string + First input string. + str2: string + Second input string. + + Returns + ------- + out: string + Concatenated string. + + Examples + -------- + > var out = {{alias}}( 'beep', 'boop' ) + 'beepboop' + + See Also + -------- diff --git a/lib/node_modules/@stdlib/string/base/concat/docs/types/index.d.ts b/lib/node_modules/@stdlib/string/base/concat/docs/types/index.d.ts new file mode 100644 index 000000000000..9e291dab1f8b --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/docs/types/index.d.ts @@ -0,0 +1,37 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Concatenates two strings. +* +* @param str1 - first string +* @param str2 - second string +* @returns concatenated string +* +* @example +* var out = concat( 'beep', 'boop' ); +* // returns 'beepboop' +*/ +declare function concat( str1: S1, str2: S2 ): `${S1}${S2}`; + + +// EXPORTS // + +export = concat; diff --git a/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts new file mode 100644 index 000000000000..2134d3c2b325 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts @@ -0,0 +1,57 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import concat = require( './index' ); + + +// TESTS // + +// The function returns a string... +{ + concat( 'beep', 'boop' ); // $ExpectType "beepboop" + concat( 'foo', 'bar' ); // $ExpectType "foobar" + concat( 'abc' as string, 'xyz' as string ); // $ExpectType string +} + +// The compiler throws an error if the function is provided a first argument that is not a string... +{ + concat( true, 'boop' ); // $ExpectError + concat( null, 'boop' ); // $ExpectError + concat( undefined, 'boop' ); // $ExpectError + concat( 123, 'boop' ); // $ExpectError + concat( {}, 'boop' ); // $ExpectError + concat( [], 'boop' ); // $ExpectError + concat( ( x: number ): number => x, 'boop' ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument that is not a string... +{ + concat( 'beep', true ); // $ExpectError + concat( 'beep', null ); // $ExpectError + concat( 'beep', undefined ); // $ExpectError + concat( 'beep', 123 ); // $ExpectError + concat( 'beep', {} ); // $ExpectError + concat( 'beep', [] ); // $ExpectError + concat( 'beep', ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + concat( 'beep' ); // $ExpectError + concat(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/string/base/concat/examples/index.js b/lib/node_modules/@stdlib/string/base/concat/examples/index.js new file mode 100644 index 000000000000..96c9151daef2 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/examples/index.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var concat = require( './../lib' ); + +var str = concat( 'beep', 'boop' ); +console.log( str ); +// => 'beepboop' + +str = concat( 'foo', 'bar' ); +console.log( str ); +// => 'foobar' + +str = concat( 'Hello, ', 'world!' ); +console.log( str ); +// => 'Hello, world!' + +str = concat( '', 'empty' ); +console.log( str ); +// => 'empty' + +str = concat( 'test', '' ); +console.log( str ); +// => 'test' diff --git a/lib/node_modules/@stdlib/string/base/concat/lib/index.js b/lib/node_modules/@stdlib/string/base/concat/lib/index.js new file mode 100644 index 000000000000..6707d888e0e1 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/lib/index.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Concatenate two strings. +* +* @module @stdlib/string/base/concat +* +* @example +* var concat = require( '@stdlib/string/base/concat' ); +* +* var str = concat( 'beep', 'boop' ); +* // returns 'beepboop' +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/string/base/concat/lib/main.js b/lib/node_modules/@stdlib/string/base/concat/lib/main.js new file mode 100644 index 000000000000..1e4c9e305d9b --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/lib/main.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MAIN // + +/** +* Concatenates two strings. +* +* @param {string} str1 - first string +* @param {string} str2 - second string +* @returns {string} concatenated string +* +* @example +* var str = concat( 'beep', 'boop' ); +* // returns 'beepboop' +*/ +function concat( str1, str2 ) { + return str1 + str2; +} + + +// EXPORTS // + +module.exports = concat; diff --git a/lib/node_modules/@stdlib/string/base/concat/package.json b/lib/node_modules/@stdlib/string/base/concat/package.json new file mode 100644 index 000000000000..6c1e65caf3c8 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/package.json @@ -0,0 +1,66 @@ +{ + "name": "@stdlib/string/base/lowercase", + "version": "0.0.0", + "description": "Convert a string to lowercase.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdstring", + "utilities", + "utility", + "utils", + "util", + "base", + "lower", + "case", + "lowercase", + "convert", + "string", + "str" + ] +} diff --git a/lib/node_modules/@stdlib/string/base/concat/test/test.js b/lib/node_modules/@stdlib/string/base/concat/test/test.js new file mode 100644 index 000000000000..64612c6e2a52 --- /dev/null +++ b/lib/node_modules/@stdlib/string/base/concat/test/test.js @@ -0,0 +1,62 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var concat = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof concat, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function concatenates two strings', function test( t ) { + var expected; + var values; + var actual; + var i; + + values = [ + [ 'beep', 'boop' ], + [ 'foo', 'bar' ], + [ 'Hello, ', 'World!' ], + [ '', 'empty' ], + [ 'non-empty', '' ], + [ '', '' ] + ]; + expected = [ + 'beepboop', + 'foobar', + 'Hello, World!', + 'empty', + 'non-empty', + '' + ]; + for ( i = 0; i < values.length; i++ ) { + actual = concat( values[i][0], values[i][1] ); + t.strictEqual( actual, expected[i], 'returns '+expected[i] ); + } + t.end(); +}); From ba17dea43b6afaeecdf7c0acf87ac25eb4ded0d9 Mon Sep 17 00:00:00 2001 From: sagar7162 Date: Thu, 13 Nov 2025 14:45:04 +0530 Subject: [PATCH 2/4] fix: corrected copyright year --- 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: passed - 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 --- --- lib/node_modules/@stdlib/string/base/concat/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/string/base/concat/README.md b/lib/node_modules/@stdlib/string/base/concat/README.md index 25e4abe4e16e..859591730b4b 100644 --- a/lib/node_modules/@stdlib/string/base/concat/README.md +++ b/lib/node_modules/@stdlib/string/base/concat/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2022 The Stdlib Authors. +Copyright (c) 2025 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From beee1726668f69d3af97d78af6365cb96920045c Mon Sep 17 00:00:00 2001 From: sagar7162 Date: Thu, 13 Nov 2025 14:51:59 +0530 Subject: [PATCH 3/4] fix: update package.json --- 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: passed - 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 --- --- .../@stdlib/string/base/concat/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/string/base/concat/package.json b/lib/node_modules/@stdlib/string/base/concat/package.json index 6c1e65caf3c8..f40f3955bd19 100644 --- a/lib/node_modules/@stdlib/string/base/concat/package.json +++ b/lib/node_modules/@stdlib/string/base/concat/package.json @@ -1,7 +1,7 @@ { - "name": "@stdlib/string/base/lowercase", + "name": "@stdlib/string/base/concat", "version": "0.0.0", - "description": "Convert a string to lowercase.", + "description": "Concatenate two strings.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", @@ -56,10 +56,10 @@ "utils", "util", "base", - "lower", - "case", - "lowercase", - "convert", + "concat", + "concatenate", + "join", + "combine", "string", "str" ] From 6bb478a433d2ee3352a0974feded591515dead92 Mon Sep 17 00:00:00 2001 From: Athan Date: Tue, 18 Nov 2025 00:08:53 -0800 Subject: [PATCH 4/4] chore: clean-up --- 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: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - 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: passed - task: lint_license_headers status: passed --- --- .../@stdlib/string/base/concat/README.md | 19 ++----------------- .../string/base/concat/benchmark/benchmark.js | 4 ++-- .../@stdlib/string/base/concat/docs/repl.txt | 1 + .../string/base/concat/docs/types/test.ts | 6 +++--- .../@stdlib/string/base/concat/test/test.js | 2 +- 5 files changed, 9 insertions(+), 23 deletions(-) diff --git a/lib/node_modules/@stdlib/string/base/concat/README.md b/lib/node_modules/@stdlib/string/base/concat/README.md index 859591730b4b..b3132b2d8202 100644 --- a/lib/node_modules/@stdlib/string/base/concat/README.md +++ b/lib/node_modules/@stdlib/string/base/concat/README.md @@ -38,10 +38,10 @@ var concat = require( '@stdlib/string/base/concat' ); #### concat( str1, str2 ) -Converts a string to concat. +Concatenates two strings. ```javascript -var out = concat('beep', 'boop'); +var out = concat( 'beep', 'boop' ); // returns 'beepboop' ``` @@ -82,13 +82,6 @@ str = concat( '123', '' ); @@ -97,14 +90,6 @@ str = concat( '123', '' ); diff --git a/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js b/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js index c32d814cb1e4..1f73f939bb08 100644 --- a/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/string/base/concat/benchmark/benchmark.js @@ -39,7 +39,7 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - out = concat( values1[ i % values1.length ], values2[ i % values2.length ] ); + out = concat( values1[ i%values1.length ], values2[ i%values2.length ] ); // eslint-disable-line max-len if ( typeof out !== 'string' ) { b.fail( 'should return a string' ); } @@ -63,7 +63,7 @@ bench( pkg + '::builtin', function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { - out = values1[ i % values1.length ].concat( values2[ i % values2.length ] ); + out = values1[ i%values1.length ].concat( values2[ i%values2.length ] ); if ( typeof out !== 'string' ) { b.fail( 'should return a string' ); } diff --git a/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt b/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt index d7f59ce8bd05..92bb45607c04 100644 --- a/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt +++ b/lib/node_modules/@stdlib/string/base/concat/docs/repl.txt @@ -6,6 +6,7 @@ ---------- str1: string First input string. + str2: string Second input string. diff --git a/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts index 2134d3c2b325..d7beea4cb005 100644 --- a/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/base/concat/docs/types/test.ts @@ -28,7 +28,7 @@ import concat = require( './index' ); concat( 'abc' as string, 'xyz' as string ); // $ExpectType string } -// The compiler throws an error if the function is provided a first argument that is not a string... +// The compiler throws an error if the function is provided a first argument which is not a string... { concat( true, 'boop' ); // $ExpectError concat( null, 'boop' ); // $ExpectError @@ -39,7 +39,7 @@ import concat = require( './index' ); concat( ( x: number ): number => x, 'boop' ); // $ExpectError } -// The compiler throws an error if the function is provided a second argument that is not a string... +// The compiler throws an error if the function is provided a second argument which is not a string... { concat( 'beep', true ); // $ExpectError concat( 'beep', null ); // $ExpectError @@ -52,6 +52,6 @@ import concat = require( './index' ); // The compiler throws an error if the function is provided insufficient arguments... { - concat( 'beep' ); // $ExpectError concat(); // $ExpectError + concat( 'beep' ); // $ExpectError } diff --git a/lib/node_modules/@stdlib/string/base/concat/test/test.js b/lib/node_modules/@stdlib/string/base/concat/test/test.js index 64612c6e2a52..0a59ec7476cf 100644 --- a/lib/node_modules/@stdlib/string/base/concat/test/test.js +++ b/lib/node_modules/@stdlib/string/base/concat/test/test.js @@ -56,7 +56,7 @@ tape( 'the function concatenates two strings', function test( t ) { ]; for ( i = 0; i < values.length; i++ ) { actual = concat( values[i][0], values[i][1] ); - t.strictEqual( actual, expected[i], 'returns '+expected[i] ); + t.strictEqual( actual, expected[i], 'returns expected value' ); } t.end(); });