diff --git a/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js index 8607bbb9c32f..33fc3f324a41 100644 --- a/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js @@ -74,7 +74,8 @@ tape( 'the function computes the Bessel function of the first kind of order one besselj1By( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.length = 5; // sparse array y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -82,7 +83,8 @@ tape( 'the function computes the Bessel function of the first kind of order one besselj1By( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.length = 5; // sparse array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index ff6a86a85ddb..ab25eebc9955 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -18,13 +18,17 @@ 'use strict'; -var join = require( 'path' ).join; -var tryRequire = require( '@stdlib/utils/try-require' ); var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); +var add; + // Try loading the add-on: -var add = tryRequire( join( __dirname, 'addon.node' ) ); +try { + add = require( './addon.node' ); +} catch ( err ) { + add = err; +} /** * Main execution sequence.