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

run-series

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

run-series - npm Package Compare versions

Comparing version 0.5.0 to 1.0.0

24

index.js

@@ -1,2 +0,22 @@

module.exports = require('./series')
module.exports.waterfall = require('./waterfall')
module.exports = function (tasks, cb) {
var current = 0
var results = []
cb = cb || function () {}
function done (err, result) {
if (err) return cb(err, results)
results.push(result)
if (++current >= tasks.length) {
cb(null, results)
} else {
tasks[current](done)
}
}
if (tasks.length) {
tasks[0](done)
} else {
cb(null, [])
}
}

2

package.json
{
"name": "run-series",
"description": "Run an array of functions in series",
"version": "0.5.0",
"version": "1.0.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh",

var series = require('../')
var test = require('tape')
test('require(run-series/series) usage', function (t) {
t.equal(series, require('../series'))
t.end()
})
test('functions run in series', function (t) {

@@ -10,0 +5,0 @@ t.plan(4)

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