Comparing version 1.0.0-rc to 1.0.0-rc1
{ | ||
"name": "async_fn", | ||
"version": "1.0.0-rc", | ||
"version": "1.0.0-rc1", | ||
"author": "Sergey Shishkalov <sergeyshishkalov@gmail.com>", | ||
"description": "One-function library for calling asynchronous functions one by one in a queue", | ||
"main": "src/index.js", | ||
"main": "dist/index.umd.js", | ||
"devDependencies": { | ||
@@ -13,3 +13,4 @@ "@babel/core": "^7.25.2", | ||
"jest-extended": "^4.0.2", | ||
"ts-node": "^10.9.2" | ||
"ts-node": "^10.9.2", | ||
"vite": "^5.4.6" | ||
}, | ||
@@ -20,2 +21,3 @@ "engine": { | ||
"scripts": { | ||
"build": "vite build", | ||
"test": "jest" | ||
@@ -22,0 +24,0 @@ }, |
let queue = Promise.resolve() | ||
export default (fn) => | ||
const addToAsyncQueue = (fn) => | ||
new Promise((resolve, reject) => { | ||
queue = queue.then(fn).then(resolve, reject) | ||
}) | ||
export default addToAsyncQueue |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13846
12
249
0
7