Skip to content

Commit daf45d0

Browse files
committed
Update based on function namespace packages
1 parent 8dd1c8f commit daf45d0

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

lib/node_modules/@stdlib/utils/flatten-array/lib/gen_fcn.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var Function = require( '@stdlib/function/ctor' );
24+
25+
26+
// MAIN //
27+
2128
/**
2229
* Returns a function to flatten an array containing elements all having the same dimensions.
2330
*
@@ -72,7 +79,7 @@ function genFcn( dims ) {
7279
f += '//# sourceURL=flatten_array.gen_fcn.js';
7380

7481
// Create the function in the global scope:
75-
return ( new Function( f ) )(); // eslint-disable-line no-new-func
82+
return ( new Function( f ) )();
7683

7784
/*
7885
* e.g.,

lib/node_modules/@stdlib/utils/function-name/test/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var proxyquire = require( 'proxyquire' );
2525
var Int8Array = require( '@stdlib/array/int8' );
2626
var Buffer = require( '@stdlib/buffer/ctor' );
2727
var Number = require( '@stdlib/number/ctor' );
28+
var Function = require( '@stdlib/function/ctor' );
2829
var functionName = require( './../lib' );
2930

3031

@@ -95,7 +96,7 @@ tape( 'if provided an anonymous function, the function returns an empty string o
9596
name = functionName( function () {} ); // eslint-disable-line func-names
9697
t.equal( check( name ), true, 'returns an empty string (or "anonymous")' );
9798

98-
name = functionName( new Function('a', 'b', 'return') ); // eslint-disable-line no-new-func
99+
name = functionName( new Function('a', 'b', 'return') );
99100
t.equal( check( name ), true, 'returns an empty string (or "anonymous")' );
100101

101102
t.end();

lib/node_modules/@stdlib/utils/global/lib/codegen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @returns {Object} global object
2828
*/
2929
function getGlobal() {
30-
return new Function( 'return this;' )(); // eslint-disable-line no-new-func
30+
return new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals
3131
}
3232

3333

0 commit comments

Comments
 (0)