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

protos.js

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protos.js - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "protos.js",
"version": "1.0.4",
"version": "1.0.5",
"description": "String and Array prototypes for a more easy life",

@@ -5,0 +5,0 @@ "main": "protos.js",

@@ -44,2 +44,6 @@ /*

Array.prototype.choice = function() {
return this[Math.floor(Math.random()*this.length)];
}
Array.prototype.hasSimilar = function(str, min_ratio) {

@@ -55,2 +59,8 @@ var hash = str.hash();

Array.prototype.unique = function() {
return this.filter(function(item, pos, self) {
return self.indexOf(item) == pos;
});
}
Array.prototype.load = function(filename) {

@@ -68,2 +78,21 @@ var arr = this;

Array.prototype.clear = function() {
this = [];
}
Array.prototype.sched = function(millis, cb) {
if (this.length == 0)
return;
if (!this.last)
this.last = 0;
cb(this[this.last]);
this.last++;
if (this.last==this.length)
this.last = 0;
setTimeout(this.sched.bind(this, millis, cb), millis);
}
String.prototype.load = function(filename, cb) {

@@ -70,0 +99,0 @@ if (cb) {

Sorry, the diff of this file is not supported yet

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