Skip to content

Instantly share code, notes, and snippets.

@spirinvladimir
Created April 9, 2019 20:41
Show Gist options
  • Save spirinvladimir/0c5cd700aae9b41c616ae5f75518a7f7 to your computer and use it in GitHub Desktop.
Save spirinvladimir/0c5cd700aae9b41c616ae5f75518a7f7 to your computer and use it in GitHub Desktop.
Node.js callback -> Promises , PS: many thanks Redis
new Promise((y, n) => redis((e, db) => e ? n(e) : y(db)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment