diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/README.md b/lib/node_modules/@stdlib/array/base/linspace2d/README.md new file mode 100644 index 000000000000..db2cdf5f6941 --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/README.md @@ -0,0 +1,132 @@ + + +# linspace2d + +> Generate a linearly spaced two-dimensional nested numeric array. + +
+ +## Usage + +```javascript +var linspace2d = require( '@stdlib/array/base/linspace2d' ); +``` + +#### linspace2d( start, stop, shape, colexicographic ) + +Generates a linearly spaced two-dimensional nested numeric array. + +```javascript +var x = linspace2d( 0, 100, [ 2, 3 ], false ); +// returns [ [ 0, 20, 40 ], [ 60, 80, 100 ] ] + +x = linspace2d( 0, 100, [ 2, 3 ], true ); +// returns [ [ 0, 40, 80 ], [ 20, 60, 100 ] ] +``` + +The function accepts the following arguments: + +- **start**: first array value. +- **stop**: last array value. +- **shape**: array shape. +- **colexicographic**: specifies whether generated array values should be stored in colexicographic order. + +
+ + + +
+ +## Notes + +- The output array is guaranteed to include the `start` and `stop` values. Beware, however, that values between `start` and `stop` are subject to floating-point rounding errors. Hence, + + ```javascript + var arr = linspace2d( 0, 1, [ 1, 3 ], false ); + // returns [ [ 0, ~0.5, 1 ] ] + ``` + + where `arr[0][1]` is only guaranteed to be approximately equal to `0.5`. If you desire more control over element precision, consider using [`roundn`][@stdlib/math/base/special/roundn]: + + ```javascript + var roundn = require( '@stdlib/math/base/special/roundn' ); + var map2d = require( '@stdlib/array/base/map2d' ); + + var arr = linspace2d( 0, 1, [ 1, 3 ], false ); + // returns [ [ 0, ~0.5, 1 ] ] + + // Round each value to the nearest tenth: + var out = map2d( arr, [ 1, 3 ], clbk ); + // returns [ [ 0, 0.5, 1 ] ] + + function clbk( v ) { + return roundn( v, -1 ); + } + ``` + +
+ + + +
+ +## Examples + + + +```javascript +var linspace2d = require( '@stdlib/array/base/linspace2d' ); + +var out = linspace2d( 0, 10, [ 2, 5 ], false ); +console.log( out ); + +out = linspace2d( 0, 10, [ 2, 3 ], true ); +console.log( out ); + +out = linspace2d( 0, 10, [ 4, 2 ], true ); +console.log( out ); + +// Create an array of arrays with decremented values: +out = linspace2d( 10, 0, [ 2, 5 ], false ); +console.log( out ); +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/linspace2d/benchmark/benchmark.js new file mode 100644 index 000000000000..809b638dec9c --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/benchmark/benchmark.js @@ -0,0 +1,48 @@ +/** +* @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 isArrayArray = require( '@stdlib/assert/is-array-array' ); +var pkg = require( './../package.json' ).name; +var linspace2d = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var i; + var v; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = linspace2d( 0.0, 100.0, [ 2, 3 ], false ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an array of arrays' ); + } + } + b.toc(); + if ( !isArrayArray( v ) ) { + b.fail( 'should return an array of arrays' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/benchmark/benchmark.size.js b/lib/node_modules/@stdlib/array/base/linspace2d/benchmark/benchmark.size.js new file mode 100644 index 000000000000..997c4ac02238 --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/benchmark/benchmark.size.js @@ -0,0 +1,95 @@ +/** +* @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 pow = require( '@stdlib/math/base/special/pow' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var isArrayArray = require( '@stdlib/assert/is-array-array' ); +var pkg = require( './../package.json' ).name; +var linspace2d = require( './../lib' ); + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} N - array lengths +* @returns {Function} benchmark function +*/ +function createBenchmark( N ) { + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var v; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = linspace2d( 0.0, 100.0, [ N, N ], false ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an array of arrays' ); + } + } + b.toc(); + if ( !isArrayArray( v ) ) { + b.fail( 'should return an array of arrays' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var min; + var max; + var N; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + N = floor( sqrt( pow( 10, i ) ) ); + f = createBenchmark( N ); + bench( pkg+'::square_matrix:size='+(N*N), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/docs/repl.txt b/lib/node_modules/@stdlib/array/base/linspace2d/docs/repl.txt new file mode 100644 index 000000000000..5a81829026f7 --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/docs/repl.txt @@ -0,0 +1,33 @@ + +{{alias}}( start, stop, shape, colexicographic ) + Generates a linearly spaced two-dimensional nested numeric array. + + The output array is guaranteed to include the `start` and `stop` values. + + Parameters + ---------- + start: number + First array value. + + stop: number + Last array value. + + shape: Array + Array shape. + + colexicographic: boolean + Specifies whether generated array values should be stored in + colexicographic order. + + Returns + ------- + out: Array + Linearly spaced two-dimensional nested numeric array. + + Examples + -------- + > var arr = {{alias}}( 0, 10, [ 2, 3 ], false ) + [ [ 0, 2, 4 ], [ 6, 8, 10 ] ] + + See Also + -------- diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/base/linspace2d/docs/types/index.d.ts new file mode 100644 index 000000000000..7d7589090437 --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/docs/types/index.d.ts @@ -0,0 +1,49 @@ +/* +* @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 + +import { Shape2D } from '@stdlib/types/ndarray'; + +/** +* Two-dimensional nested array. +*/ +type Array2D = Array>; + +/** +* Generates a linearly spaced two-dimensional nested numeric array. +* +* @param start - first array value +* @param stop - last array value +* @param shape - array shape +* @param colexicographic - specifies whether generated array values should be stored in colexicographic order +* @returns linearly spaced two-dimensional nested numeric array +* +* @example +* var x = linspace2d( 0, 100, [ 2, 3 ], false ); +* // returns [ [ 0, 20, 40 ], [ 60, 80, 100 ] ] +* +* x = linspace2d( 0, 100, [ 2, 3 ], true ); +* // returns [ [ 0, 40, 80 ], [ 20, 60, 100 ] ] +*/ +declare function linspace2d( start: number, stop: number, shape: Shape2D, colexicographic: boolean ): Array2D; + + +// EXPORTS // + +export = linspace2d; diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/linspace2d/docs/types/test.ts new file mode 100644 index 000000000000..03545e0a546d --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/docs/types/test.ts @@ -0,0 +1,71 @@ +/* +* @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 linspace2d = require( './index' ); + + +// TESTS // + +// The function returns an array of arrays... +{ + linspace2d( 0, 11, [ 2, 3 ], false ); // $ExpectType Array2D +} + +// The compiler throws an error if the function is provided values other than two numbers for the first two parameters... +{ + linspace2d( true, 10, [ 2, 3 ], false ); // $ExpectError + linspace2d( false, 10, [ 2, 3 ], false ); // $ExpectError + linspace2d( '5', 10, [ 2, 3 ], false ); // $ExpectError + linspace2d( [], 10, [ 2, 3 ], false ); // $ExpectError + linspace2d( {}, 10, [ 2, 3 ], false ); // $ExpectError + linspace2d( ( x: number ): number => x, 10, [ 2, 3 ], false ); // $ExpectError + + linspace2d( 9, true, [ 2, 3 ], false ); // $ExpectError + linspace2d( 9, false, [ 2, 3 ], false ); // $ExpectError + linspace2d( 5, '5', [ 2, 3 ], false ); // $ExpectError + linspace2d( 8, [], [ 2, 3 ], false ); // $ExpectError + linspace2d( 9, {}, [ 2, 3 ], false ); // $ExpectError + linspace2d( 8, ( x: number ): number => x, [ 2, 3 ], false ); // $ExpectError +} + +// The compiler throws an error if the function is provided a value other than an array of numbers for the third parameter... +{ + linspace2d( 3, 20, true, false ); // $ExpectError + linspace2d( 4, 20, false, false ); // $ExpectError + linspace2d( 2, 20, '5', false ); // $ExpectError + linspace2d( 2, 20, [], false ); // $ExpectError + linspace2d( 9, 20, {}, false ); // $ExpectError + linspace2d( 9, 20, ( x: number ): number => x, false ); // $ExpectError +} + +// The compiler throws an error if the function is provided a value other than a boolean for the fourth parameter... +{ + linspace2d( 3, 20, [ 2, 3 ], false, '5' ); // $ExpectError + linspace2d( 4, 20, [ 2, 3 ], false, 2 ); // $ExpectError + linspace2d( 2, 20, [ 2, 3 ], false, [] ); // $ExpectError + linspace2d( 2, 20, [ 2, 3 ], false, {} ); // $ExpectError + linspace2d( 9, 20, [ 2, 3 ], ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + linspace2d(); // $ExpectError + linspace2d( 3, 20 ); // $ExpectError + linspace2d( 3, 20, [ 2, 3 ] ); // $ExpectError + linspace2d( 3, 20, [ 2, 3 ], false, {} ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/examples/index.js b/lib/node_modules/@stdlib/array/base/linspace2d/examples/index.js new file mode 100644 index 000000000000..a4f07ee8f423 --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/examples/index.js @@ -0,0 +1,34 @@ +/** +* @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 linspace2d = require( './../lib' ); + +var out = linspace2d( 0, 10, [ 2, 5 ], false ); +console.log( out ); + +out = linspace2d( 0, 10, [ 2, 3 ], true ); +console.log( out ); + +out = linspace2d( 0, 10, [ 4, 2 ], true ); +console.log( out ); + +// Create an array with decremented values: +out = linspace2d( 10, 0, [ 2, 5 ], false ); +console.log( out ); diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/lib/index.js b/lib/node_modules/@stdlib/array/base/linspace2d/lib/index.js new file mode 100644 index 000000000000..e7ea2553250a --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/lib/index.js @@ -0,0 +1,43 @@ +/** +* @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'; + +/** +* Generate a linearly spaced two-dimensional nested numeric array. +* +* @module @stdlib/array/base/linspace2d +* +* @example +* var linspace2d = require( '@stdlib/array/base/linspace2d' ); +* +* var x = linspace2d( 0, 100, [ 2, 3 ], false ); +* // returns [ [ 0, 20, 40 ], [ 60, 80, 100 ] ] +* +* x = linspace2d( 0, 100, [ 2, 3 ], true ); +* // returns [ [ 0, 40, 80 ], [ 20, 60, 100 ] ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/lib/main.js b/lib/node_modules/@stdlib/array/base/linspace2d/lib/main.js new file mode 100644 index 000000000000..a0e8c73fdfbd --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/lib/main.js @@ -0,0 +1,84 @@ +/** +* @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 // + +/** +* Generates a linearly spaced two-dimensional nested numeric array. +* +* @param {number} start - first array value +* @param {number} stop - last array value +* @param {NonNegativeIntegerArray} shape - array shape +* @param {boolean} colexicographic - specifies whether generated array values should be stored in colexicographic order +* @returns {Array} linearly spaced two-dimensional nested numeric array +* +* @example +* var x = linspace2d( 0, 100, [ 2, 3 ], false ); +* // returns [ [ 0, 20, 40 ], [ 60, 80, 100 ] ] +* +* x = linspace2d( 0, 100, [ 2, 3 ], true ); +* // returns [ [ 0, 40, 80 ], [ 20, 60, 100 ] ] +*/ +function linspace2d( start, stop, shape, colexicographic ) { + var inc0; + var inc1; + var out; + var tmp; + var idx; + var s0; + var i0; + var s1; + var i1; + var d; + var n; + + s0 = shape[ 1 ]; + s1 = shape[ 0 ]; + + n = s0 * s1; + if ( n === 0 ) { + return []; + } + d = ( stop - start ) / ( n - 1 ); + if ( colexicographic ) { + inc0 = s1; // index increment for the innermost loop + inc1 = 1 - ( s0 * inc0 ); // index increment for the outermost loop + } else { + inc0 = 1; // index increment for the innermost loop + inc1 = 0; // index increment for the outermost loop + } + out = []; + idx = 0; + for ( i1 = 0; i1 < s1; i1++ ) { + tmp = []; + for ( i0 = 0; i0 < s0; i0++ ) { + tmp.push( start + ( idx * d ) ); + idx += inc0; + } + out.push( tmp ); + idx += inc1; + } + return out; +} + + +// EXPORTS // + +module.exports = linspace2d; diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/package.json b/lib/node_modules/@stdlib/array/base/linspace2d/package.json new file mode 100644 index 000000000000..42d31cfc8ced --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/package.json @@ -0,0 +1,67 @@ +{ + "name": "@stdlib/array/base/linspace2d", + "version": "0.0.0", + "description": "Generate a linearly spaced two-dimensional nested numeric array.", + "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", + "stdmath", + "utilities", + "utils", + "mathematics", + "math", + "generic", + "array", + "array2d", + "matlab", + "linear", + "linspace", + "linspace2d", + "nested" + ] +} diff --git a/lib/node_modules/@stdlib/array/base/linspace2d/test/test.js b/lib/node_modules/@stdlib/array/base/linspace2d/test/test.js new file mode 100644 index 000000000000..9e82fc8a9aa7 --- /dev/null +++ b/lib/node_modules/@stdlib/array/base/linspace2d/test/test.js @@ -0,0 +1,105 @@ +/** +* @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 isArrayArray = require( '@stdlib/assert/is-array-array' ); +var linspace2d = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof linspace2d, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a linearly spaced two-dimensional nested array', function test( t ) { + var expected; + var actual; + var start; + var stop; + var sh; + + start = 0; + stop = 10; + sh = [ 2, 3 ]; + + actual = linspace2d( start, stop, sh, false ); + + // Verify that the output is a nested array: + t.strictEqual( isArrayArray( actual ), true, 'returns expected value' ); + + // Verify that the returned array includes the start and stop values: + t.strictEqual( actual[0][0], start, 'returns expected value' ); + t.strictEqual( actual[actual.length-1][2], 10, 'returns expected value' ); + + // Verify correct values: + actual = linspace2d( 0, 100, sh, false ); + expected = [ [ 0, 20, 40 ], [ 60, 80, 100 ] ]; + t.deepEqual( actual, expected, 'returns expected value' ); + + // Decrement: + actual = linspace2d( 100, 0, sh, false ); + expected = [ [ 100, 80, 60 ], [ 40, 20, 0 ] ]; + t.deepEqual( actual, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a linearly spaced two-dimensional nested array (colexicographic)', function test( t ) { + var expected; + var actual; + var start; + var stop; + var sh; + + start = 0; + stop = 10; + sh = [ 2, 3 ]; + + actual = linspace2d( start, stop, sh, true ); + + // Verify that the output is a nested array: + t.strictEqual( isArrayArray( actual ), true, 'returns expected value' ); + + // Verify that the returned array includes the start and stop values: + t.strictEqual( actual[0][0], start, 'returns expected value' ); + t.strictEqual( actual[actual.length-1][2], 10, 'returns expected value' ); + + // Verify correct values: + actual = linspace2d( 0, 100, sh, true ); + expected = [ [ 0, 40, 80 ], [ 20, 60, 100 ] ]; + t.deepEqual( actual, expected, 'returns expected value' ); + + // Decrement: + actual = linspace2d( 100, 0, sh, true ); + expected = [ [ 100, 60, 20 ], [ 80, 40, 0 ] ]; + t.deepEqual( actual, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns an empty array if the product of the number of rows and columns is `0`', function test( t ) { + t.deepEqual( linspace2d( 0, 10, [ 2, 0 ], false ), [], 'returns expected value' ); + t.end(); +});