From dedd1781412c971d7f1972914c29d6e4ab75de2c Mon Sep 17 00:00:00 2001 From: Edmundo Rodrigues Date: Thu, 10 May 2018 14:55:54 -0300 Subject: [PATCH] Update README.md Add explaining on how to import the module on a NodeJS environment that uses CommonJS. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6285dd2..959c562 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ npm i await-to-js --save ```js import to from 'await-to-js'; +// If you use CommonJS (i.e NodeJS environment), it should be: +// const to = require('await-to-js').default; async function asyncTaskWithCb(cb) { let err, user, savedUser, notification;