Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sugarlisp-async

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sugarlisp-async

a common syntax for callbacks/promises/generators/synchronous calls

  • 0.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

sugarlisp-async

a common syntax for callbacks/promises/generators/synchronous calls

These SugarLisp macros will generate code appropriate for:

  • functions taking node style cb(err,result) callbacks
  • functions returning standard A+ style Promises
  • use with the "co" generator "task runner"
  • synchronous calls via the "Sync" suffix naming convention.

The naming of the macros is based loosely on the ES7 async/await proposal. (but is in no way "spec compliant" - this is sugarlisp not javascript!)

There is a pair of async/await macros for each of the styles mentioned above.

Ideally there would be some kind of "meta data" allowing sugarlisp to choose the appropriate macros for a particular library or function you're using.

Since there is no such standard it's up to you to choose the appropriate macro for your situation e.g. "awaitcb" if it's a function that uses a node style callback, "awaitp" if it's a function returning a promise etc.

Keywords

FAQs

Package last updated on 06 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc