Anthor async control flow by generator without promise.
Weekly downloads
Readme
Anthor async control flow by generator without promise.
const yq = require('yq')
const fs = require('fs')
let readFile = function *() {
var caller = yield
fs.readFile('example', { encoding: 'utf-8' }, function (err, content) {
if (err) {
caller.error(err)
} else {
caller.success(content)
}
})
}
const yq = require('yq')
const readFile = yq.yield(require('fs').readFile)
yq(function *() {
var content = yield readFile('example', { encoding: 'utf-8' })
console.log(content) // ...
})
FAQs
Anthor async control flow by generator without promise.
The npm package yq receives a total of 360 weekly downloads. As such, yq popularity was classified as not popular.
We found that yq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.