Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

yq

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

yq

Anthor async control flow by generator without promise.

    0.0.1latest
    npm

Version published
Maintainers
1
Weekly downloads
413
decreased by-57.81%

Weekly downloads

Readme

Source

yq

Anthor async control flow by generator without promise.

No 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) } }) }

Yield

const yq = require('yq') const readFile = yq.yield(require('fs').readFile) yq(function *() { var content = yield readFile('example', { encoding: 'utf-8' }) console.log(content) // ... })

Keywords

FAQs

Last updated on 24 Mar 2015

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.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc