Comparing version 1.1.0 to 1.2.0
13
index.js
Collection = { | ||
isEmpty() { return this.length === 0; }, | ||
notEmpty() { return !this.isEmpty(); }, | ||
first() { return this[0]; }, | ||
last() { return this[this.length-1]; }, | ||
}; | ||
String.prototype.__proto__ = Collection; | ||
Array.prototype.__proto__ = Collection; | ||
// ideal implementation, not recommended | ||
//Object.setPrototypeOf(Array.prototype, Collection); | ||
//Object.setPrototypeOf(String.prototype, Collection); | ||
// implementation w/o changing prototypes hierarchy | ||
Object.keys(Collection).forEach(function (methodName) { | ||
Array.prototype[methodName] = Collection[methodName]; | ||
String.prototype[methodName] = Collection[methodName]; | ||
}); |
{ | ||
"name": "oow", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Extension methods that should exist in JS core by default", | ||
"homepage": "https://github.com/ngarbezza/oow", | ||
"repository": { | ||
"type" : "git", | ||
"url" : "https://github.com/ngarbezza/oow" | ||
}, | ||
"main": "index.js", | ||
@@ -6,0 +11,0 @@ "scripts": { |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2165
4
14
1
1
3
0
0