New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

laissez-faire

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laissez-faire - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

4

package.json
{
"name": "laissez-faire",
"version": "0.6.2",
"version": "0.6.3",
"description": "A promise implementation. Simple and fast",

@@ -16,3 +16,3 @@ "main": "src/index.js",

},
"scripts" : {
"scripts": {
"build": "node ./glue.js",

@@ -19,0 +19,0 @@ "test": "node tests/"

@@ -8,5 +8,3 @@ exports = module.exports = Promise

*/
function Promise () {
this.children = []
}
function Promise () {this.length = 0}

@@ -129,4 +127,4 @@ /**

proto.then = function(done, fail) {
var thenPromise
this.children.push(thenPromise = new Promise)
var thenPromise
this[this.length++] = (thenPromise = new Promise)
thenPromise._success = done

@@ -146,3 +144,3 @@ thenPromise._fail = fail

// Queue a sudo-promise capable of throwing errors
this.children.push({
this[this.length++] = {
// Handlers are bound to the assignment properties since these aren't run inside a try catch. Having no handlers is fine, the values will just pass straight through to the resolvers.

@@ -152,3 +150,3 @@ resolve: done || noop,

reject: fail || function (e) { throw e }
})
}
return this

@@ -247,5 +245,5 @@ }

// Propagate the value to any queued promises.
var children = this.children, child, i = 0
var child, i = 0
// Use a forward loop to maintain insertion order
while (child = children[i++]) {
while (child = this[i++]) {
if (child._success) propagate(child, child._success, value)

@@ -280,8 +278,8 @@ else child.resolve(value)

var children = this.children, i = 0, child
if (child = children[i]) {
var i = 0, child
if (child = this[i]) {
do {
if (child._fail) propagate(child, child._fail, e)
else child.reject(e)
} while (child = children[++i])
} while (child = this[++i])
}

@@ -288,0 +286,0 @@ else {

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