command-line-args
Advanced tools
Comparing version 3.0.4 to 3.0.5
31
index.js
var detect = require('feature-detect-es6') | ||
if (!detect.newArrayFeatures()) { | ||
require('core-js/es6/array') | ||
} | ||
if (detect.all('class', 'arrowFunction')) { | ||
@@ -12,1 +8,28 @@ module.exports = require('./src/lib/command-line-args') | ||
} | ||
/* for node 0.12 */ | ||
if (!Array.prototype.find) { | ||
Object.defineProperty(Array.prototype, 'find', { | ||
value: function(predicate) { | ||
'use strict'; | ||
if (this == null) { | ||
throw new TypeError('Array.prototype.find called on null or undefined'); | ||
} | ||
if (typeof predicate !== 'function') { | ||
throw new TypeError('predicate must be a function'); | ||
} | ||
var list = Object(this); | ||
var length = list.length >>> 0; | ||
var thisArg = arguments[1]; | ||
var value; | ||
for (var i = 0; i < length; i++) { | ||
value = list[i]; | ||
if (predicate.call(thisArg, value, i, list)) { | ||
return value; | ||
} | ||
} | ||
return undefined; | ||
} | ||
}); | ||
} |
{ | ||
"name": "command-line-args", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "A library to parse command-line options.", | ||
@@ -38,4 +38,3 @@ "repository": "https://github.com/75lb/command-line-args.git", | ||
"dependencies": { | ||
"array-back": "^1.0.3", | ||
"core-js": "^2.4.1", | ||
"array-back": "^1.0.4", | ||
"feature-detect-es6": "^1.3.1", | ||
@@ -42,0 +41,0 @@ "find-replace": "^1.0.2", |
@@ -5,6 +5,2 @@ 'use strict' | ||
if (!detect.newArrayFeatures()) { | ||
require('core-js/es6/array') | ||
} | ||
if (detect.all('class', 'arrowFunction', 'let', 'const')) { | ||
@@ -11,0 +7,0 @@ TestRunner.run('src/test/*.js') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
107009
4
2609
0
- Removedcore-js@^2.4.1
- Removedcore-js@2.6.12(transitive)
Updatedarray-back@^1.0.4