UNPKG

fsp

Version:

A minimal `fs` that returns A+ promises (when). For each `fs.xxx` function, it adds an `fs.xxxP` returning promises.

29 lines (23 loc) 893 B
/** * fsp http://github.com/anodynos/fsp/ * * A minimal `fs` that returns A+ promises (when). For each `fs.xxx` function, it adds an `fs.xxxP` returning promises. * Version 0.1.2 - Compiled on 2014-11-14 01:24:39 * Repository git://github.com/anodynos/fsp * Copyright(c) 2014 Agelos Pikoulas <agelos.pikoulas@gmail.com> * License MIT http://www.opensource.org/licenses/mit-license.php */ // Generated by uRequire v0.7.0-beta9 target: 'lib' template: 'nodejs' (function () { var __isAMD = !!(typeof define === 'function' && define.amd), __isNode = (typeof exports === 'object'), __isWeb = !__isNode; var fs, whenNode; whenNode = require("when/node"); fs = require("fs"); whenNode.liftAll(fs, function (pfs, liftedFunc, name) { pfs["" + name + "P"] = name !== "exists" ? liftedFunc : whenNode.lift(require("fs-exists")); return pfs; }, fs); module.exports = fs; }).call(this)