Socket
Book a DemoInstallSign in
Socket

promiseext

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promiseext

To Extend the Promise, not to execute the executor function until then is invoked

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Synopsis

PromiseExt is a wrapper on top of promise, which will not execute the promise executor until <>.then() is called.

Code Example

PromiseExt = require('promiseext');
var promise = new PromiseExt(function(resolve, reject) {
    resolve({data:'sample'});
});

promise.then(function(resp) {
    console.log("in Then");
}, function(resp) {
    console.log("in Reject");
});


Installation

Step1 :

npm install promiseext

Step2 :

PromiseExt = require('promiseext');

// then start using PromiseExt like Promise

License

MIT License.

Keywords

Promise

FAQs

Package last updated on 21 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.