Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oow

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oow - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

LICENSE

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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc