Skip to content

yi/async.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async.lua

This is a port of caolan's Async.js lib into lua

By now, only async.eachSeries and async.mapSeries has been implementated

Usage

local async = require("lib.async")
local FIXTURE01 = { "first", "second", "third", "fourth", "fifth" }
local processor = function(item, next)
  print("[processor] item:" .. tostring(item))
  next()
end
async.eachSeries(FIXTURE01, processor, function(err)
  assert((err == nil))
  end
)

for more, please refer to eachSeries and mapSeries

Test

Test specs are written in moonscript on busted

To run tests, do:

busted spec/

About

this is a port of caolan's Async.js lib into lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published