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

@braintree/extended-promise

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@braintree/extended-promise - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

dist/index.js

22

CHANGELOG.md

@@ -0,17 +1,27 @@

# 0.4.0
- Add typescript types
# 0.3.1
* convert global to window (closes braintree-web#401)
- convert global to window (closes braintree-web#401)
# 0.3.0
* Add `suppressUnhandledPromiseMessage` option
- Add `suppressUnhandledPromiseMessage` option
# 0.2.1
* Limit promise method creation to known promise methods
- Limit promise method creation to known promise methods
# 0.2.0
* Allow ExtendedPromise to be a drop-in replacement for Promise
- Allow ExtendedPromise to be a drop-in replacement for Promise
# 0.1.1
* Fix issue where instantitation would fail if Promise global did not exist
- Fix issue where instantitation would fail if Promise global did not exist
# 0.1.0
* Initial release
- Initial release
{
"name": "@braintree/extended-promise",
"version": "0.3.1",
"version": "0.4.0",
"files": [

@@ -12,5 +12,9 @@ "index.js"

"homepage": "https://github.com/braintree/extended-promise",
"main": "index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"lint": "eslint .",
"prepublishOnly": "npm run build",
"prebuild": "prettier --write .",
"build": "tsc --declaration",
"lint": "eslint --ext js,ts .",
"posttest": "npm run lint",

@@ -23,7 +27,16 @@ "test": "jest"

"devDependencies": {
"@types/jest": "^25.2.1",
"eslint": "^6.7.2",
"eslint-config-braintree": "^4.0.0",
"jest": "^24.9.0"
"eslint-config-braintree": "^5.0.0-typescript-prep-rc.17",
"jest": "^25.3.0",
"prettier": "^2.0.4",
"ts-jest": "^25.3.1",
"typescript": "^3.8.3"
},
"dependencies": {}
"dependencies": {},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"verbose": true
}
}

@@ -1,3 +0,2 @@

extended-promise
----------------
## extended-promise

@@ -21,3 +20,3 @@ Promises are great! But, could they be even better?

class MyCustomObject {
constructor () {
constructor() {
this._promise = new Promise((resolve, reject) => {

@@ -34,3 +33,3 @@ this._resolveFunction = resolve;

} else {
this._rejectFunction(new Error('fail'));
this._rejectFunction(new Error("fail"));
}

@@ -50,3 +49,3 @@ }

class MyCustomObject {
constructor () {
constructor() {
this._promise = new ExtendedPromise();

@@ -60,3 +59,3 @@ }

} else {
this._promise.reject(new Error('fail'));
this._promise.reject(new Error("fail"));
}

@@ -85,3 +84,3 @@ }

return Promise.reject(error);
}
},
});

@@ -96,3 +95,3 @@ ```

var promise = new ExtendedPromise({
suppressUnhandledPromiseMessage: true
suppressUnhandledPromiseMessage: true,
});

@@ -152,3 +151,3 @@

```js
const PromisePolyfill = require('promise-polyfill');
const PromisePolyfill = require("promise-polyfill");

@@ -155,0 +154,0 @@ ExtendedPromise.setPromise(PromisePolyfill);

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