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

async_fn

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async_fn - npm Package Compare versions

Comparing version 1.0.0-rc to 1.0.0-rc1

dist/index.mjs

8

package.json
{
"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
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