Socket
Socket
Sign inDemoInstall

a-promise

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    a-promise

A lightweight Promise implementation in NodeJS


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

A Promise

An extremely lightweight Promise Polyfill for Node and Browsers. It doesn't support all the features yet, but It supports what a normal person needs to keep the code clean. If you need something added, just open an issue.

Installation

npm install a-promise

Example

In case you don't know what Promises are, then this example should give you a basic intro.

function MyFunction(Num){
  return new Promise(function(Resolve, Reject){
    // Do something asyncly
    Resolve(Num * 100);
  });
}
MyFunction(5).then(function(Result){
  console.log(Result); // Outputs 500
});

Keywords

FAQs

Last updated on 09 Jun 2015

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc