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

kew

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kew - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

25

kew.js

@@ -65,3 +65,4 @@ function Promise(onSuccess, onFail) {

Promise.prototype._chainPromise = function (promise) {
if (this._hasData) promise.withInput(this._data)
if (this._child) this._child._chainPromise(promise)
else if (this._hasData) promise.withInput(this._data)
else if (this._error) promise.withError(this._error)

@@ -133,18 +134,21 @@ else if (!this._promises) this._promises = [promise]

var counter = 0
var failed = false
var finished = false
var promise = new Promise()
var counter = promises.length
for (var i = 0; i < promises.length; i += 1) {
if (!promises[i]._isPromise) outputs[i] = promises[i]
else {
counter += 1
if (!promises[i] || !promises[i]._isPromise) {
outputs[i] = promises[i]
counter -= 1
} else {
promises[i].then(replaceEl.bind(null, outputs, i))
.then(function () {
counter--
if (counter === 0) {
if (!finished && counter === 0) {
finished = true
promise.resolve(outputs)
}
}, function (e) {
if (!failed) {
failed = true
if (!finished) {
finished = true
promise.reject(e)

@@ -156,2 +160,7 @@ }

if (counter === 0) {
finished = true
promise.resolve(outputs)
}
return promise

@@ -158,0 +167,0 @@ }

{
"name": "kew"
, "description": "kew?"
, "version": "0.0.2"
, "version": "0.0.3"
, "homepage": "https://github.com/azulus/kew"

@@ -6,0 +6,0 @@ , "authors": [

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