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

promise-creator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-creator - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

17

package.json
{
"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) {

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