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

lie

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

lie - npm Package Compare versions

Comparing version 0.6.2 to 1.0.0

2

bower.json
{
"name": "lie",
"version": "0.6.2",
"version": "1.0.0",
"main": "dist/lie.js",

@@ -5,0 +5,0 @@ "ignore": [

@@ -11,4 +11,4 @@ return exports;

}else{
create(process.nextTick,exports);
module.exports = create(process.nextTick,{});
}
})();

@@ -1,2 +0,2 @@

/*! lie 0.6.2 2013-08-17*/
/*! lie 1.0.0 2013-08-30*/
/*! (c)2013 Ruben Verborgh & Calvin Metcalf @license MIT https://github.com/calvinmetcalf/lie*/

@@ -109,2 +109,3 @@ (function(){

}
exports = createDeferred;
// Returns a resolved promise

@@ -123,3 +124,3 @@ exports.resolve = function(value) {

// Returns a deferred
exports.deferred = createDeferred;

@@ -136,4 +137,4 @@ return exports;

}else{
create(process.nextTick,exports);
module.exports = create(process.nextTick,{});
}
})();

@@ -1,2 +0,2 @@

/*! lie 0.6.2 2013-08-17*/
/*! (c)2013 Ruben Verborgh & Calvin Metcalf @license MIT https://github.com/calvinmetcalf/lie*/!function(){var a=function(a,b){function Deferred(){function Promise(){this.then=function(b,c){return a(b,c)}}var a=function(g,h,i){var j;if(g!==a)return j=c(),a.queue.push({deferred:j,resolve:g,reject:h}),j.promise;for(var k,l,m,n=h?"resolve":"reject",o=0,p=a.queue.length;p>o;o++)k=a.queue[o],l=k.deferred,m=k[n],typeof m!==f?l[n](i):e(m,i,l);a=d(b,i,h)},b=new Promise;this.promise=b,a.queue=[],this.resolve=function(b){a.queue&&a(a,!0,b)},this.fulfill=this.resolve,this.reject=function(b){a.queue&&a(a,!1,b)}}function c(){return new Deferred}function d(a,b,d){return function(g,h){var i,j=d?g:h;return typeof j!==f?a:(e(j,b,i=c()),i.promise)}}function e(b,c,d){a(function(){var a;try{a=b(c),a&&typeof a.then===f?a.then(d.resolve,d.reject):d.resolve(a)}catch(e){d.reject(e)}})}var f="function";return b.resolve=function(a){var b={};return b.then=d(b,a,!0),b},b.reject=function(a){var b={};return b.then=d(b,a,!1),b},b.deferred=c,b};"function"==typeof define?define(["setImmediate"],function(b){return a(b,{})}):"undefined"!=typeof module&&"exports"in module?a(process.nextTick,exports):a("function"==typeof setImmediate?setImmediate:setTimeout,"object"==typeof global&&global?global:this)}();
/*! lie 1.0.0 2013-08-30*/
/*! (c)2013 Ruben Verborgh & Calvin Metcalf @license MIT https://github.com/calvinmetcalf/lie*/!function(){var a=function(a,b){function Deferred(){function Promise(){this.then=function(b,c){return a(b,c)}}var a=function(g,h,i){var j;if(g!==a)return j=c(),a.queue.push({deferred:j,resolve:g,reject:h}),j.promise;for(var k,l,m,n=h?"resolve":"reject",o=0,p=a.queue.length;p>o;o++)k=a.queue[o],l=k.deferred,m=k[n],typeof m!==f?l[n](i):e(m,i,l);a=d(b,i,h)},b=new Promise;this.promise=b,a.queue=[],this.resolve=function(b){a.queue&&a(a,!0,b)},this.fulfill=this.resolve,this.reject=function(b){a.queue&&a(a,!1,b)}}function c(){return new Deferred}function d(a,b,d){return function(g,h){var i,j=d?g:h;return typeof j!==f?a:(e(j,b,i=c()),i.promise)}}function e(b,c,d){a(function(){var a;try{a=b(c),a&&typeof a.then===f?a.then(d.resolve,d.reject):d.resolve(a)}catch(e){d.reject(e)}})}var f="function";return b=c,b.resolve=function(a){var b={};return b.then=d(b,a,!0),b},b.reject=function(a){var b={};return b.then=d(b,a,!1),b},b};"function"==typeof define?define(["setImmediate"],function(b){return a(b,{})}):"undefined"!=typeof module&&"exports"in module?module.exports=a(process.nextTick,{}):a("function"==typeof setImmediate?setImmediate:setTimeout,"object"==typeof global&&global?global:this)}();

@@ -220,3 +220,3 @@ (function (global, undefined) {

/*! lie 0.6.2 2013-08-17*/
/*! lie 1.0.0 2013-08-30*/
/*! (c)2013 Ruben Verborgh & Calvin Metcalf @license MIT https://github.com/calvinmetcalf/lie*/

@@ -329,2 +329,3 @@ (function(){

}
exports = createDeferred;
// Returns a resolved promise

@@ -343,3 +344,3 @@ exports.resolve = function(value) {

// Returns a deferred
exports.deferred = createDeferred;

@@ -356,4 +357,4 @@ return exports;

}else{
create(process.nextTick,exports);
module.exports = create(process.nextTick,{});
}
})();

@@ -1,2 +0,2 @@

/*! lie 0.6.2 2013-08-17*/
/*! (c)2013 Ruben Verborgh & Calvin Metcalf @license MIT https://github.com/calvinmetcalf/lie*/!function(global,undefined){"use strict";function canUseNextTick(){return"object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)}function canUseMessageChannel(){return!!global.MessageChannel}function canUsePostMessage(){if(!global.postMessage||global.importScripts)return!1;var a=!0,b=global.onmessage;return global.onmessage=function(){a=!1},global.postMessage("","*"),global.onmessage=b,a}function canUseReadyStateChange(){return"document"in global&&"onreadystatechange"in global.document.createElement("script")}function installNextTickImplementation(a){a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return process.nextTick(function(){tasks.runIfPresent(a)}),a}}function installMessageChannelImplementation(a){var b=new global.MessageChannel;b.port1.onmessage=function(a){var b=a.data;tasks.runIfPresent(b)},a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return b.port2.postMessage(a),a}}function installPostMessageImplementation(a){function b(a,b){return"string"==typeof a&&a.substring(0,b.length)===b}function c(a){if(a.source===global&&b(a.data,d)){var c=a.data.substring(d.length);tasks.runIfPresent(c)}}var d="com.bn.NobleJS.setImmediate"+Math.random();global.addEventListener?global.addEventListener("message",c,!1):global.attachEvent("onmessage",c),a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return global.postMessage(d+a,"*"),a}}function installReadyStateChangeImplementation(a){a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments),b=global.document.createElement("script");return b.onreadystatechange=function(){tasks.runIfPresent(a),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},global.document.documentElement.appendChild(b),a}}function installSetTimeoutImplementation(a){a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return global.setTimeout(function(){tasks.runIfPresent(a)},0),a}}var tasks=function(){function Task(a,b){this.handler=a,this.args=b}Task.prototype.run=function(){if("function"==typeof this.handler)this.handler.apply(undefined,this.args);else{var scriptSource=""+this.handler;eval(scriptSource)}};var nextHandle=1,tasksByHandle={},currentlyRunningATask=!1;return{addFromSetImmediateArguments:function(a){var b=a[0],c=Array.prototype.slice.call(a,1),d=new Task(b,c),e=nextHandle++;return tasksByHandle[e]=d,e},runIfPresent:function(a){if(currentlyRunningATask)global.setTimeout(function(){tasks.runIfPresent(a)},0);else{var b=tasksByHandle[a];if(b){currentlyRunningATask=!0;try{b.run()}finally{delete tasksByHandle[a],currentlyRunningATask=!1}}}},remove:function(a){delete tasksByHandle[a]}}}();if(!global.setImmediate){var attachTo="function"==typeof Object.getPrototypeOf&&"setTimeout"in Object.getPrototypeOf(global)?Object.getPrototypeOf(global):global;canUseNextTick()?installNextTickImplementation(attachTo):canUsePostMessage()?installPostMessageImplementation(attachTo):canUseMessageChannel()?installMessageChannelImplementation(attachTo):canUseReadyStateChange()?installReadyStateChangeImplementation(attachTo):installSetTimeoutImplementation(attachTo),attachTo.clearImmediate=tasks.remove}}("object"==typeof global&&global?global:this),function(){var a=function(a,b){function Deferred(){function Promise(){this.then=function(b,c){return a(b,c)}}var a=function(g,h,i){var j;if(g!==a)return j=c(),a.queue.push({deferred:j,resolve:g,reject:h}),j.promise;for(var k,l,m,n=h?"resolve":"reject",o=0,p=a.queue.length;p>o;o++)k=a.queue[o],l=k.deferred,m=k[n],typeof m!==f?l[n](i):e(m,i,l);a=d(b,i,h)},b=new Promise;this.promise=b,a.queue=[],this.resolve=function(b){a.queue&&a(a,!0,b)},this.fulfill=this.resolve,this.reject=function(b){a.queue&&a(a,!1,b)}}function c(){return new Deferred}function d(a,b,d){return function(g,h){var i,j=d?g:h;return typeof j!==f?a:(e(j,b,i=c()),i.promise)}}function e(b,c,d){a(function(){var a;try{a=b(c),a&&typeof a.then===f?a.then(d.resolve,d.reject):d.resolve(a)}catch(e){d.reject(e)}})}var f="function";return b.resolve=function(a){var b={};return b.then=d(b,a,!0),b},b.reject=function(a){var b={};return b.then=d(b,a,!1),b},b.deferred=c,b};"function"==typeof define?define(["setImmediate"],function(b){return a(b,{})}):"undefined"!=typeof module&&"exports"in module?a(process.nextTick,exports):a("function"==typeof setImmediate?setImmediate:setTimeout,"object"==typeof global&&global?global:this)}();
/*! lie 1.0.0 2013-08-30*/
/*! (c)2013 Ruben Verborgh & Calvin Metcalf @license MIT https://github.com/calvinmetcalf/lie*/!function(global,undefined){"use strict";function canUseNextTick(){return"object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)}function canUseMessageChannel(){return!!global.MessageChannel}function canUsePostMessage(){if(!global.postMessage||global.importScripts)return!1;var a=!0,b=global.onmessage;return global.onmessage=function(){a=!1},global.postMessage("","*"),global.onmessage=b,a}function canUseReadyStateChange(){return"document"in global&&"onreadystatechange"in global.document.createElement("script")}function installNextTickImplementation(a){a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return process.nextTick(function(){tasks.runIfPresent(a)}),a}}function installMessageChannelImplementation(a){var b=new global.MessageChannel;b.port1.onmessage=function(a){var b=a.data;tasks.runIfPresent(b)},a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return b.port2.postMessage(a),a}}function installPostMessageImplementation(a){function b(a,b){return"string"==typeof a&&a.substring(0,b.length)===b}function c(a){if(a.source===global&&b(a.data,d)){var c=a.data.substring(d.length);tasks.runIfPresent(c)}}var d="com.bn.NobleJS.setImmediate"+Math.random();global.addEventListener?global.addEventListener("message",c,!1):global.attachEvent("onmessage",c),a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return global.postMessage(d+a,"*"),a}}function installReadyStateChangeImplementation(a){a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments),b=global.document.createElement("script");return b.onreadystatechange=function(){tasks.runIfPresent(a),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},global.document.documentElement.appendChild(b),a}}function installSetTimeoutImplementation(a){a.setImmediate=function(){var a=tasks.addFromSetImmediateArguments(arguments);return global.setTimeout(function(){tasks.runIfPresent(a)},0),a}}var tasks=function(){function Task(a,b){this.handler=a,this.args=b}Task.prototype.run=function(){if("function"==typeof this.handler)this.handler.apply(undefined,this.args);else{var scriptSource=""+this.handler;eval(scriptSource)}};var nextHandle=1,tasksByHandle={},currentlyRunningATask=!1;return{addFromSetImmediateArguments:function(a){var b=a[0],c=Array.prototype.slice.call(a,1),d=new Task(b,c),e=nextHandle++;return tasksByHandle[e]=d,e},runIfPresent:function(a){if(currentlyRunningATask)global.setTimeout(function(){tasks.runIfPresent(a)},0);else{var b=tasksByHandle[a];if(b){currentlyRunningATask=!0;try{b.run()}finally{delete tasksByHandle[a],currentlyRunningATask=!1}}}},remove:function(a){delete tasksByHandle[a]}}}();if(!global.setImmediate){var attachTo="function"==typeof Object.getPrototypeOf&&"setTimeout"in Object.getPrototypeOf(global)?Object.getPrototypeOf(global):global;canUseNextTick()?installNextTickImplementation(attachTo):canUsePostMessage()?installPostMessageImplementation(attachTo):canUseMessageChannel()?installMessageChannelImplementation(attachTo):canUseReadyStateChange()?installReadyStateChangeImplementation(attachTo):installSetTimeoutImplementation(attachTo),attachTo.clearImmediate=tasks.remove}}("object"==typeof global&&global?global:this),function(){var a=function(a,b){function Deferred(){function Promise(){this.then=function(b,c){return a(b,c)}}var a=function(g,h,i){var j;if(g!==a)return j=c(),a.queue.push({deferred:j,resolve:g,reject:h}),j.promise;for(var k,l,m,n=h?"resolve":"reject",o=0,p=a.queue.length;p>o;o++)k=a.queue[o],l=k.deferred,m=k[n],typeof m!==f?l[n](i):e(m,i,l);a=d(b,i,h)},b=new Promise;this.promise=b,a.queue=[],this.resolve=function(b){a.queue&&a(a,!0,b)},this.fulfill=this.resolve,this.reject=function(b){a.queue&&a(a,!1,b)}}function c(){return new Deferred}function d(a,b,d){return function(g,h){var i,j=d?g:h;return typeof j!==f?a:(e(j,b,i=c()),i.promise)}}function e(b,c,d){a(function(){var a;try{a=b(c),a&&typeof a.then===f?a.then(d.resolve,d.reject):d.resolve(a)}catch(e){d.reject(e)}})}var f="function";return b=c,b.resolve=function(a){var b={};return b.then=d(b,a,!0),b},b.reject=function(a){var b={};return b.then=d(b,a,!1),b},b};"function"==typeof define?define(["setImmediate"],function(b){return a(b,{})}):"undefined"!=typeof module&&"exports"in module?module.exports=a(process.nextTick,{}):a("function"==typeof setImmediate?setImmediate:setTimeout,"object"==typeof global&&global?global:this)}();
{
"name": "lie",
"version": "0.6.2",
"version": "1.0.0",
"description": "A minimal and fast promise/deferred implementation",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -33,3 +33,3 @@ # lie

```javascript
var one = resolve("one");
var one = deferred.resolve("one");
one.then(console.log);

@@ -41,3 +41,3 @@ /* one */

```javascript
var none = reject("error");
var none = deferred.reject("error");
none.then(console.log, console.error);

@@ -71,9 +71,6 @@ /* error */

```javascript
var lie = require('lie');
var deferred = lie.deferred;
var resolve = lie.resolve;
var reject = lie.reject;
var deferred = require('lie');
var resolve = deferred.resolve;
var reject = deferred.reject;
```
Or you could just use the lie prefix.
exports.all = function(array) {
var promise = exports.deferred();
var promise = createDeferred();
var len = array.length;

@@ -4,0 +4,0 @@ var resolved = 0;

@@ -105,2 +105,3 @@ var func = 'function';

}
exports = createDeferred;
// Returns a resolved promise

@@ -119,2 +120,2 @@ exports.resolve = function(value) {

// Returns a deferred
exports.deferred = createDeferred;

@@ -1,13 +0,4 @@

var lie = require('../dist/lie.min.js');
module.exports = {
fullfilled: lie.resolve,
rejected: lie.reject,
pending: function () {
var deferred = lie.deferred();
return {
promise: deferred.promise,
fulfill: deferred.resolve,
reject: deferred.reject,
};
},
};
var deferred = require('../dist/lie.min');
exports.fullfilled = deferred.resolve;
exports.rejected = deferred.reject;
exports.pending = deferred;
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