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

jdefer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jdefer - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

index.mjs

6

index.d.ts
export interface IDefer<T> {
resolve(v: T): void;
reject(e: Error): void;
promise: Promise<T>;
}
declare const makeDefer: <T = void>() => IDefer<T>;
export default makeDefer;
export default function makeDefer<T = void>(): IDefer<T>;

@@ -1,10 +0,11 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const makeDefer = () => {
let resolve = undefined;
let reject = undefined;
'use strict'
Object.defineProperty(exports, '__esModule', {value: true})
function makeDefer() {
let resolve = undefined
let reject = undefined
const promise = new Promise((rs, rj) => {
resolve = rs;
reject = rj;
});
resolve = rs
reject = rj
})
return {

@@ -14,4 +15,5 @@ resolve,

promise
};
};
exports.default = makeDefer;
}
}
exports.default = makeDefer
{
"name": "jdefer",
"version": "0.0.3",
"version": "0.0.4",
"main": "index.js",

@@ -8,4 +8,11 @@ "repository": "https://github.com/tranvansang/jdefer",

"index.js",
"index.d.ts"
"index.d.ts",
"index.mjs"
],
"exports": {
".": {
"import": "./index.mjs",
"require": "./index.js"
}
},
"keywords": [

@@ -12,0 +19,0 @@ "promise",

@@ -13,2 +13,4 @@ # Javascript promise defer library

import makeDefer from 'jdefer'
// or
const makeDefer = require('jdefer').default

@@ -15,0 +17,0 @@ const defer = makeDefer()

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