Socket
Socket
Sign inDemoInstall

extrinsic-promises

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

CHANGES.yaml

3

package.json
{
"name": "extrinsic-promises",
"version": "1.0.0",
"version": "1.1.0",
"description": "A convenient promises anti-pattern: promises you can settle from outside the promise.",

@@ -18,2 +18,3 @@ "keywords": [

"check:lint:ci": "npm-run-all --parallel check:lint:ci:*",
"check:lint:changes": "yamllint CHANGES.yaml",
"check:lint:readme:markdown": "remark --no-stdout README.md",

@@ -20,0 +21,0 @@ "check:lint:readme": "npm-run-all --parallel check:lint:readme:*",

@@ -97,2 +97,11 @@ [![Build Status](https://travis-ci.org/mearns/extrinsic-promises.svg?branch=master)](https://travis-ci.org/mearns/extrinsic-promises)

This method is already bound and can be used correctly as a function reference. E.g.,:
```javascript
const exPromise = new ExtrinsicPromise()
const fulfillLater = exPromise.fulfill
// ...
fulfillLater(value) // correctly fulfills exPromise.
```
### `ExtrinsicPromise::reject([forReason])`

@@ -103,2 +112,22 @@

This method is already bound and can be used correctly as a function reference. E.g.,:
```javascript
const exPromise = new ExtrinsicPromise()
const rejectLater = exPromise.reject
// ...
rejectLater(reason) // correctly rejects exPromise.
```
### `ExtrinsicPromise::adopt(thennable)`
Adopt the state of the given thennable, once the thennable settles, if this extrinsic promise has not _already_
settled. This is a convenience for using this extrinsic promise's `fulfill` and `reject` methods as the on-fulfill
and on-reject handlers, respectively, of the given thennable, as follows:
```javascript
const exPromise = new ExtrinsicPromise()
thennable.then(exPromise.fulfill, exPromise.reject)
```
### `ExtrinsicPromise::work(workfunction)`

@@ -105,0 +134,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc