fastzalgo
v1.0.0
Published
Dezalgo at top speed
Downloads
16
Maintainers
Readme
fastzalgo
Makes a function asynchronous by wrapping it inside process.nexTick
.
Similar to dezalgo but almost 3 times faster:
runDezalgo*10000000: 7553ms
runFastzalgo*10000000: 2845ms
The main difference from dezalgo is that you must call the callback only once.
Usage
'use strict'
const zalgo = require('.')
const print = console.log
const asyncPrint = zalgo(console.log)
asyncPrint('this happens after')
print('this happens before')
// Prints:
//
// this happens before
// this happens after
Install
npm i fastzalgo -g
License
MIT