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

promise-callbacks

Package Overview
Dependencies
Maintainers
23
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-callbacks - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

1

CHANGELOG.md
## Release History
* 3.2.1 Use explicit exports per #16.
* 3.2.0 Add `defer` function, similar to `$.Deferred`

@@ -4,0 +5,0 @@ * 3.1.0 Add `promisify.method` convenience method

8

package.json
{
"name": "promise-callbacks",
"version": "3.2.0",
"version": "3.2.1",
"description": "Utilities to help convert a callback-using codebase to promises.",

@@ -41,3 +41,7 @@ "engines": {

"lint"
]
],
"repository": {
"type": "git",
"url": "git+ssh://github.com/mixmaxhq/promise-callbacks.git"
}
}

@@ -19,3 +19,3 @@ 'use strict';

module.exports = {
module.exports = Object.assign({
patchPromise,

@@ -29,6 +29,2 @@ unpatchPromise,

promisifyAll: promisify.all,
};
for (let method of require('./statics')) {
module.exports[method.name] = method;
}
}, require('./statics'));

@@ -7,7 +7,7 @@ 'use strict';

const props = {};
for (let fn of staticProperties) {
if (Promise[fn.name] && Promise[fn.name] !== fn) {
throw new Error(`Promise already defines ${fn.name}.`);
for (const [fnName, fn] of Object.entries(staticProperties)) {
if (Promise[fnName] && Promise[fnName] !== fn) {
throw new Error(`Promise already defines ${fnName}.`);
}
props[fn.name] = {
props[fnName] = {
configurable: true,

@@ -23,5 +23,5 @@ enumerable: false,

function unpatchPromise() {
for (let fn of staticProperties) {
if (Promise[fn.name] === fn) {
delete Promise[fn.name];
for (const [fnName, fn] of Object.entries(staticProperties)) {
if (Promise[fnName] === fn) {
delete Promise[fnName];
}

@@ -37,4 +37,2 @@ }

for (let fn of staticProperties) {
module.exports.statics[fn.name] = fn;
}
Object.assign(module.exports.statics, staticProperties);
'use strict';
module.exports = [
require('./asCallback'),
require('./delay'),
require('./immediate'),
require('./nextTick'),
require('./waitOn'),
require('./withTimeout'),
require('./wrapAsync'),
];
module.exports = {
asCallback: require('./asCallback'),
delay: require('./delay'),
immediate: require('./immediate'),
nextTick: require('./nextTick'),
waitOn: require('./waitOn'),
withTimeout: require('./withTimeout'),
wrapAsync: require('./wrapAsync'),
};
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