Skip to content

Commit 593f38b

Browse files
committed
Refactor to avoid dynamic exports
1 parent 6395417 commit 593f38b

File tree

1 file changed

+12
-6
lines changed
  • lib/node_modules/@stdlib/utils/inherit/lib

1 file changed

+12
-6
lines changed

lib/node_modules/@stdlib/utils/inherit/lib/detect.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22

33
// MODULES //
44

5-
var objectCreate = require( './native.js' );
6-
var createObject = require( './polyfill.js' );
5+
var builtin = require( './native.js' );
6+
var polyfill = require( './polyfill.js' );
77

88

9-
// EXPORTS //
9+
// MAIN //
1010

11-
if ( typeof objectCreate === 'function' ) {
12-
module.exports = objectCreate;
11+
var createObject;
12+
if ( typeof builtin === 'function' ) {
13+
createObject = builtin;
1314
} else {
14-
module.exports = createObject;
15+
createObject = polyfill;
1516
}
17+
18+
19+
// EXPORTS //
20+
21+
module.exports = createObject;

0 commit comments

Comments
 (0)