promise-creator
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "promise-creator", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "small helper function to easly create new promises", | ||
"main": "lib/promise-creator.js", | ||
"jsnext:main": "promise-creator.js", | ||
"main": "promise-creator.js", | ||
"scripts": { | ||
"test": "babel-node test.js", | ||
"build": "babel promise-creator.js --out-dir lib" | ||
"test": "node test.js" | ||
}, | ||
"author": "Goran Gajic <fero.null@gmail.com>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel": "^5.8.29", | ||
"bluebird": "*" | ||
}, | ||
"peerDependencies": { | ||
"bluebird": "*" | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/gorangajic/promise-creator.git" | ||
} | ||
} |
@@ -1,4 +0,3 @@ | ||
var Promise = require('bluebird'); | ||
export default function promiseCreator() { | ||
module.exports = function promiseCreator() { | ||
var resolve; | ||
@@ -14,3 +13,3 @@ var reject; | ||
promise: promise | ||
} | ||
}; | ||
} |
### Promise creator | ||
[![Build Status](https://semaphoreci.com/api/v1/gorangajic/promise-creator/branches/master/badge.svg)](https://semaphoreci.com/gorangajic/promise-creator) | ||
> small helper function to easly create new promises | ||
@@ -14,3 +16,4 @@ | ||
import promiseCreator from 'promise-creator'; | ||
let {resolve, reject, promise} = promiseCreator(); | ||
const { resolve, reject, promise } = promiseCreator(); | ||
return promise; | ||
@@ -23,7 +26,8 @@ ``` | ||
function delay(ms) { | ||
let {resolve, reject, promise} = promiseCreator(); | ||
const {resolve, reject, promise} = promiseCreator(); | ||
setTimeout(function() { | ||
resolve(); | ||
}, ms) | ||
}, ms); | ||
return promise; | ||
@@ -30,0 +34,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import promiseCreator from './'; | ||
const promiseCreator = require('./promise-creator'); | ||
@@ -3,0 +3,0 @@ function delay(ms) { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
0
38
0
1751
5
29
1