Linux premium71.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
LiteSpeed
Server IP : 198.187.29.8 & Your IP : 18.118.32.150
Domains :
Cant Read [ /etc/named.conf ]
User : cleahvkv
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
node_modules /
npm /
node_modules /
dezalgo /
Delete
Unzip
Name
Size
Permission
Date
Action
.travis.yml
111
B
-rw-r--r--
2021-03-10 14:36
LICENSE
765
B
-rw-r--r--
2021-03-10 14:36
README.md
651
B
-rw-r--r--
2021-03-10 14:36
dezalgo.js
368
B
-rw-r--r--
2021-03-10 14:36
package.json
3.15
KB
-rw-r--r--
2021-03-10 14:36
Save
Rename
# dezalgo Contain async insanity so that the dark pony lord doesn't eat souls See [this blog post](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony). ## USAGE Pass a callback to `dezalgo` and it will ensure that it is *always* called in a future tick, and never in this tick. ```javascript var dz = require('dezalgo') var cache = {} function maybeSync(arg, cb) { cb = dz(cb) // this will actually defer to nextTick if (cache[arg]) cb(null, cache[arg]) fs.readFile(arg, function (er, data) { // since this is *already* defered, it will call immediately if (er) cb(er) cb(null, cache[arg] = data) }) } ```