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

promiscuous

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promiscuous - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

.travis.yml

16

build/build.js

@@ -5,6 +5,9 @@ #!/usr/bin/env node

var copyright = fs.readFileSync("promiscuous.js", "utf8").match(/.*\n/)[0];
var minified = copyright + UglifyJS.minify("promiscuous.js").code;
var browserified = minified.replace("module.exports", "Promise")
.replace("setImmediate", "setTimeout");
var full = fs.readFileSync("promiscuous.js", "utf8");
var copyright = full.match(/.*\n/)[0];
var minified = copyright + UglifyJS.minify(full, { fromString: true }).code;
var browserFull = full.replace("module.exports", "window.Promise")
.replace("setImmediate", "setTimeout");
var browser = copyright + UglifyJS.minify(browserFull, { fromString: true }).code
.replace("window.Promise", "Promise");

@@ -16,4 +19,5 @@ var path = "dist/";

fs.writeFileSync(path + "promiscuous-node.js", minified);
fs.writeFileSync(path + "promiscuous-browser.js", browserified);
fs.writeFileSync(path + "promiscuous-browser.js", browser);
fs.writeFileSync(path + "promiscuous-browser-full.js", browserFull);
fs.writeFileSync(path + "promiscuous-shim.js",
browserified.replace("!", "(typeof Promise)[0]!='u'||"));
browser.replace("!", "(typeof Promise)[0]!='u'||"));
{
"name": "promiscuous",
"version": "0.6.0",
"version": "0.7.0",
"description": "A minimal and fast promise implementation",

@@ -5,0 +5,0 @@ "author": "Ruben Verborgh <ruben.verborgh@gmail.com>",

@@ -69,4 +69,4 @@ /**@license MIT-promiscuous-©Ruben Verborgh*/

// Create and return the promise (reusing the callback variable)
callback.call(callback = { then: function (resolved, rejected) { return handler(resolved, rejected); },
catch: function (rejected) { return handler(0, rejected); } },
callback.call(callback = { then: function (resolved, rejected) { return handler(resolved, rejected); },
"catch": function (rejected) { return handler(0, rejected); } },
function (value) { handler(is, 1, value); },

@@ -128,2 +128,12 @@ function (reason) { handler(is, 0, reason); });

};
// Returns a promise that resolves or rejects as soon as one promise in the array does
Promise.race = function (promises) {
return Promise(function (resolve, reject) {
// Register to all promises in the array
promises.map(function (promise) {
ResolvedPromise(promise).then(resolve, reject);
});
});
};
})('f', 'o');
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