Comparing version 1.4.1 to 1.5.0
15
oow.js
@@ -18,3 +18,4 @@ (function () { | ||
take(n) { return this.slice(0, n) }, | ||
drop(n) { return this.slice(n, this.length) } | ||
drop(n) { return this.slice(n, this.length) }, | ||
count(predicate) { return this.filter(predicate).length }, | ||
}; | ||
@@ -41,2 +42,8 @@ | ||
return this.reduce(sumElement, startValue || 0) | ||
}, | ||
}; | ||
const StringExtensions = { | ||
filter(predicate) { | ||
return this.split('').filter(predicate).join(''); | ||
} | ||
@@ -59,3 +66,7 @@ }; | ||
extend(Array.prototype, ArrayExtensions, methodName) | ||
) | ||
); | ||
eachExtensionOf(StringExtensions, methodName => | ||
extend(String.prototype, StringExtensions, methodName) | ||
); | ||
})(); |
{ | ||
"name": "oow", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Extension methods that should exist in JS core by default", | ||
@@ -23,4 +23,4 @@ "homepage": "https://github.com/ngarbezza/oow", | ||
"devDependencies": { | ||
"@ngarbezza/testy": "^1.2.0" | ||
"@ngarbezza/testy": "^2.1.0" | ||
} | ||
} |
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
3785
61