You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/utils/library-manifest/bin/cli
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@
23
23
// MODULES //
24
24
25
25
varresolve=require('path').resolve;
26
+
27
+
// NOTE: we explicitly avoid using `@stdlib/fs/read-file` in this particular package in order to avoid circular dependencies. This should not be problematic as this command-line utility will be executed via Node.js.
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/utils/library-manifest/lib/is_object.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
/**
24
24
* Tests if a value is an object; e.g., `{}`.
25
25
*
26
+
* @private
26
27
* @param {*} value - value to test
27
28
* @returns {boolean} boolean indicating whether value is an object
28
29
*
@@ -38,7 +39,7 @@ function isObject( value ) {
38
39
return(
39
40
typeofvalue==='object'&&
40
41
value!==null&&
41
-
!Array.isArray(value)
42
+
!Array.isArray(value)// NOTE: we inline the `isObject` function from `@stdlib/assert/is-object` and use the built-in `isArray` method in this particular package in order to avoid circular dependencies. This should not be problematic as (1) this package is unlikely to be used outside of Node.js and, thus, in environments lacking support for the built-in APIs, and (2) most of the historical bugs for the respective APIs were in environments such as IE and not the versions of V8 included in Node.js >= v0.10.x.
@@ -37,6 +36,10 @@ var DEFAULTS = require( './defaults.json' );
37
36
38
37
vardebug=logger('library-manifest:main');
39
38
39
+
// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies. This should not be problematic as (1) this package is unlikely to be used outside of Node.js and, thus, in environments lacking support for the built-in APIs, and (2) most of the historical bugs for the respective APIs were in environments such as IE and not the versions of V8 included in Node.js >= v0.10.x.
// NOTE: Instead of using `@stdlib/utils/copy`, we stringify and then parse the configuration object to create a deep copy in an ES5 environment while avoiding circular dependencies. This assumes that the configuration object is valid JSON.
// If we exhausted all the options, then we found a match...
133
138
if(j===coptnames.length){
139
+
// NOTE: Instead of using `@stdlib/utils/copy`, we stringify and then parse the object to create a deep copy in an ES5 environment while avoiding circular dependencies. This assumes that the object is valid JSON.
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/utils/library-manifest/lib/unique.js
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,12 @@
18
18
19
19
'use strict';
20
20
21
+
// VARIABLES //
22
+
23
+
// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies. This should not be problematic as (1) this package is unlikely to be used outside of Node.js and, thus, in environments lacking support for the built-in APIs, and (2) most of the historical bugs for the respective APIs were in environments such as IE and not the versions of V8 included in Node.js >= v0.10.x.
// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies. This should not be problematic as (1) this package is unlikely to be used outside of Node.js and, thus, in environments lacking support for the built-in APIs, and (2) most of the historical bugs for the respective APIs were in environments such as IE and not the versions of V8 included in Node.js >= v0.10.x.
24
24
varisObject=require('./is_object.js');
25
25
26
26
27
+
// VARIABLES //
28
+
29
+
varhasOwnProp=Object.prototype.hasOwnProperty;
30
+
31
+
27
32
// MAIN //
28
33
29
34
/**
@@ -51,13 +56,13 @@ function validate( opts, options ) {
51
56
if(!isObject(options)){
52
57
returnnewTypeError('invalid argument. Options argument must be an object. Value: `'+options+'`.');
53
58
}
54
-
if(hasOwnProp(options,'basedir')){
59
+
if(hasOwnProp.call(options,'basedir')){
55
60
opts.basedir=options.basedir;
56
61
if(typeofopts.basedir!=='string'){
57
62
returnnewTypeError('invalid option. `basedir` option must be a primitive string. Option: `'+opts.basedir+'`.');
58
63
}
59
64
}
60
-
if(hasOwnProp(options,'paths')){
65
+
if(hasOwnProp.call(options,'paths')){
61
66
opts.paths=options.paths;
62
67
if(typeofopts.paths!=='string'){
63
68
returnnewTypeError('invalid option. `paths` option must be a primitive string. Option: `'+opts.paths+'`.');
0 commit comments