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

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.4 to 1.0.5

11

CHANGELOG.md

@@ -0,1 +1,12 @@

<a name="1.0.5"></a>
## 1.0.5 (2017-03-02)
* Refactor ([009123c](https://github.com/kikobeats/cb2promise/commit/009123c))
* Remove browser build ([d4c19c7](https://github.com/kikobeats/cb2promise/commit/d4c19c7))
* Update bumped ([2cb5c94](https://github.com/kikobeats/cb2promise/commit/2cb5c94))
* Update node version ([589ae5a](https://github.com/kikobeats/cb2promise/commit/589ae5a))
* Use const when is possible ([9319164](https://github.com/kikobeats/cb2promise/commit/9319164))
<a name="1.0.4"></a>

@@ -2,0 +13,0 @@ ## 1.0.4 (2017-03-02)

33

index.js

@@ -1,3 +0,30 @@

'use strict';
require('coffee-script/register');
module.exports = require(__dirname + '/lib/cb2promise');
'use strict'
const Promise = require('pinkie-promise')
const sliced = require('sliced')
function cb2promise () {
let args = sliced(arguments)
const fn = args.shift()
let resolve
let reject
function callbackHandle () {
let err
args = sliced(arguments)
err = args.shift()
return (!err) ? resolve.apply(null, args) : reject(err)
};
function promiseFactory (resolvePromise, rejectPromise) {
resolve = resolvePromise
reject = rejectPromise
return fn.apply(null, args)
}
args.push(callbackHandle)
return new Promise(promiseFactory)
};
module.exports = cb2promise

30

package.json

@@ -5,4 +5,4 @@ {

"homepage": "https://github.com/Kikobeats/cb2promise",
"version": "1.0.4",
"main": "./dist/cb2promise.js",
"version": "1.0.5",
"main": "index.js",
"author": {

@@ -29,21 +29,19 @@ "email": "josefrancisco.verdu@gmail.com",

"dependencies": {
"coffee-script": "*",
"pinkie-promise": "*"
"pinkie-promise": "~2.0.1",
"sliced": "~1.0.1"
},
"devDependencies": {
"browserify": "*",
"coffeeify": "*",
"gulp": "*",
"gulp-header": "*",
"gulp-uglify": "*",
"gulp-util": "*",
"mocha": "*",
"should": "*",
"vinyl-buffer": "*",
"vinyl-source-stream": "*"
"browserify": "latest",
"coffee-script": "latest",
"mocha": "latest",
"should": "latest",
"standard": "latest"
},
"engines": {
"node": ">= 0.10.0",
"npm": ">= 1.4.0"
"node": ">= 4"
},
"files": [
"dist",
"index.js"
],
"scripts": {

@@ -50,0 +48,0 @@ "test": "sh test/test.sh"

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