refactor: convert to cjs
This commit is contained in:
parent
0abf7f5633
commit
534ba472a8
12
index.js
12
index.js
|
@ -1,10 +1,10 @@
|
|||
export default function pDefer() {
|
||||
const deferred = {};
|
||||
exports = function pDefer () {
|
||||
const deferred = {}
|
||||
|
||||
deferred.promise = new Promise((resolve, reject) => {
|
||||
deferred.resolve = resolve;
|
||||
deferred.reject = reject;
|
||||
});
|
||||
deferred.resolve = resolve
|
||||
deferred.reject = reject
|
||||
})
|
||||
|
||||
return deferred;
|
||||
return deferred
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
|
|
Loading…
Reference in New Issue