UNPKG

q

Version:

A library for promises (CommonJS/Promises/A,B,D)

12 lines (8 loc) 187 B
var Q = require("q"); var FS = require("q-fs"); Q.when(FS.read(__filename)) .then(function (text) { return text.toUpperCase(); }).then(function (text) { console.log(text); });