Socket
Socket
Sign inDemoInstall

cb2promise

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

cb2promise - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

CHANGELOG.md

2

bower.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/cb2promise",
"version": "1.0.1",
"version": "1.0.2",
"main": "./dist/cb2promise.js",

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

/**
* cb2promise - Converts whatever standard NodeJS callback function into ES6 standard promise.
* @version v1.0.0
* @version v1.0.2
* @link https://github.com/Kikobeats/cb2promise
* @license MIT
*/require=function t(n,e,r){function o(u,c){if(!e[u]){if(!n[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=e[u]={exports:{}};n[u][0].call(a.exports,function(t){var e=n[u][1][t];return o(e?e:t)},a,a.exports,t,n,e,r)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t,n,e){"use strict";var r;r=t("pinkie-promise"),n.exports=function(){var t,n,e,o,i;return t=Array.prototype.slice.call(arguments),e=t.shift(),i=null,o=null,n=function(){var n;return t=Array.prototype.slice.call(arguments),n=t.shift(),n?o(n):i.apply(null,t)},t.push(n),new r(function(n,r){return i=n,o=r,e.apply(null,t)})}},{"pinkie-promise":3}],2:[function(t,n,e){},{}],3:[function(t,n,e){(function(e){"use strict";n.exports=e.Promise||t("pinkie")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{pinkie:4}],4:[function(t,n,e){"use strict";function r(){for(var t=0;t<x.length;t++)x[t][0](x[t][1]);x=[],d=!1}function o(t,n){x.push([t,n]),d||(d=!0,g(r,0))}function i(t,n){function e(t){f(n,t)}function r(t){a(n,t)}try{t(e,r)}catch(o){r(o)}}function u(t){var n=t.owner,e=n._state,r=n._data,o=t[e],i=t.then;if("function"==typeof o){e=_;try{r=o(r)}catch(u){a(i,u)}}c(i,r)||(e===_&&f(i,r),e===v&&a(i,r))}function c(t,n){var e;try{if(t===n)throw new TypeError("A promises callback cannot return that same promise.");if(n&&("function"==typeof n||"object"==typeof n)){var r=n.then;if("function"==typeof r)return r.call(n,function(r){e||(e=!0,n!==r?f(t,r):s(t,r))},function(n){e||(e=!0,a(t,n))}),!0}}catch(o){return e||a(t,o),!0}return!1}function f(t,n){t!==n&&c(t,n)||s(t,n)}function s(t,n){t._state===w&&(t._state=m,t._data=n,o(p,t))}function a(t,n){t._state===w&&(t._state=m,t._data=n,o(h,t))}function l(t){t._then=t._then.forEach(u)}function p(t){t._state=_,l(t)}function h(t){t._state=v,l(t)}function y(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof y==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],i(t,this)}var d,w="pending",m="settled",_="fulfilled",v="rejected",b=function(){},g="undefined"!=typeof setImmediate?setImmediate:setTimeout,x=[];y.prototype={constructor:y,_state:w,_then:null,_data:void 0,then:function(t,n){var e={owner:this,then:new this.constructor(b),fulfilled:t,rejected:n};return this._state===_||this._state===v?o(u,e):this._then.push(e),e.then},"catch":function(t){return this.then(null,t)}},y.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new y(function(n,e){function r(t){return u++,function(e){i[t]=e,--u||n(i)}}for(var o,i=[],u=0,c=0;c<t.length;c++)o=t[c],o&&"function"==typeof o.then?o.then(r(c),e):i[c]=o;u||n(i)})},y.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new y(function(n,e){for(var r,o=0;o<t.length;o++)r=t[o],r&&"function"==typeof r.then?r.then(n,e):n(r)})},y.resolve=function(t){return t&&"object"==typeof t&&t.constructor===y?t:new y(function(n){n(t)})},y.reject=function(t){return new y(function(n,e){e(t)})},n.exports=y},{}],cb2promise:[function(t,n,e){"use strict";t("coffee-script/register"),n.exports=t("./lib/cb2promise")},{"./lib/cb2promise":1,"coffee-script/register":2}]},{},[]);

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/cb2promise",
"version": "1.0.1",
"version": "1.0.2",
"main": "./index.js",

@@ -27,3 +27,3 @@ "author": {

"coffee-script": "*",
"pinkie-promise": "~1.0.0"
"pinkie-promise": "*"
},

@@ -30,0 +30,0 @@ "devDependencies": {

@@ -7,3 +7,3 @@ # cb2promise

[![NPM Status](http://img.shields.io/npm/dm/cb2promise.svg?style=flat-square)](https://www.npmjs.org/package/cb2promise)
[![Gratipay](https://img.shields.io/gratipay/Kikobeats.svg?style=flat-square)](https://gratipay.com/~Kikobeats/)
[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/kikobeats)

@@ -10,0 +10,0 @@ > Converts whatever standard NodeJS callback function into ES6 standard promise.

Sorry, the diff of this file is not supported yet

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