Home
last modified time | relevance | path

Searched refs:promisify (Results 1 – 25 of 154) sorted by relevance

1234567

/third_party/node/test/parallel/
Dtest-util-promisify.js7 const { promisify } = require('util');
10 const stat = promisify(fs.stat);
31 fn[promisify.custom] = promisifedFn;
32 assert.strictEqual(promisify(fn), promisifedFn);
33 assert.strictEqual(promisify(promisify(fn)), promisifedFn);
46 assert.strictEqual(kCustomPromisifiedSymbol, promisify.custom);
47 assert.strictEqual(promisify(fn), promisifiedFn);
48 assert.strictEqual(promisify(promisify(fn)), promisifiedFn);
53 fn[promisify.custom] = 42;
55 () => promisify(fn),
[all …]
Dtest-zlib-empty-buffer.js4 const { inspect, promisify } = require('util');
14 [ promisify(zlib.deflateRaw), promisify(zlib.inflateRaw), 'raw' ],
15 [ promisify(zlib.deflate), promisify(zlib.inflate), 'deflate' ],
16 [ promisify(zlib.gzip), promisify(zlib.gunzip), 'gzip' ],
17 [ promisify(zlib.brotliCompress), promisify(zlib.brotliDecompress), 'br' ],
Dtest-dns-set-default-order.js7 const { promisify } = require('util');
55 await allowFailed(promisify(dns.lookup)('example.org'));
59 await allowFailed(promisify(dns.lookup)('example.org', {}));
65 await allowFailed(promisify(dns.lookup)('example.org'));
69 await allowFailed(promisify(dns.lookup)('example.org', {}));
75 await allowFailed(promisify(dns.lookup)('example.org'));
79 await allowFailed(promisify(dns.lookup)('example.org', {}));
85 await allowFailed(promisify(dns.lookup)('example.org'));
89 await allowFailed(promisify(dns.lookup)('example.org', {}));
Dtest-fs-promisified.js6 const { promisify } = require('util');
8 const read = promisify(fs.read);
9 const write = promisify(fs.write);
10 const exists = promisify(fs.exists);
Dtest-dns-default-verbatim-false.js7 const { promisify } = require('util');
40 await allowFailed(promisify(dns.lookup)('example.org'));
46 await allowFailed(promisify(dns.lookup)('example.org', {}));
Dtest-dns-default-verbatim-true.js7 const { promisify } = require('util');
40 await allowFailed(promisify(dns.lookup)('example.org'));
46 await allowFailed(promisify(dns.lookup)('example.org', {}));
Dtest-child-process-promisified.js5 const { promisify } = require('util');
7 const exec = promisify(child_process.exec);
8 const execFile = promisify(child_process.execFile);
/third_party/node/deps/npm/node_modules/util-promisify/test/
Dindex.js7 const promisify = require('..'); constant
10 const stat = promisify(fs.stat);
30 fn[promisify.custom] = promisifedFn;
31 assert.strictEqual(promisify(fn), promisifedFn);
32 assert.strictEqual(promisify(promisify(fn)), promisifedFn);
37 fn[promisify.custom] = 42;
39 () => promisify(fn),
62 assert.notStrictEqual(Object.getPrototypeOf(promisify(fn)),
70 promisify(fn)().then(common.mustCall((value) => {
79 promisify(fn)().then(common.mustCall((value) => {
[all …]
Dtimers.js5 const promisify = require('..'); constant
9 const setTimeout = promisify(timers.setTimeout);
10 const setImmediate = promisify(timers.setImmediate);
/third_party/node/deps/npm/node_modules/util-promisify/
DREADME.md2 # util-promisify
4 Node 8's [`require('util').promisify`](https://nodejs.org/api/util.html#util_util_promisify_origina…
8 …ps://travis-ci.org/juliangruber/util-promisify.svg?branch=master)](http://travis-ci.org/juliangrub…
9 …downloads](https://img.shields.io/npm/dm/util-promisify.svg)](https://www.npmjs.org/package/util-p…
10 [![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/util-promisify.svg)](https://green…
15 const promisify = require('util-promisify');
18 const stat = promisify(fs.stat);
28 $ npm install util-promisify
33 See `util.promisify`'s [API docs](https://nodejs.org/api/util.html#util_util_promisify_original).
35 ### promisify(original)
[all …]
Dindex.js7 const kCustomPromisifiedSymbol = util.promisify && util.promisify.custom || Symbol('util.promisify.…
10 function promisify(orig) { function
89 promisify.custom = kCustomPromisifiedSymbol;
91 module.exports = promisify;
/third_party/node/deps/npm/node_modules/es6-promisify/
DREADME.md1 …tps://travis-ci.org/digitaldesignlabs/es6-promisify.svg)](https://travis-ci.org/digitaldesignlabs/…
3 # es6-promisify
9 Install with [npm](https://npmjs.org/package/es6-promisify)
12 npm install --save es6-promisify
21 const promisify = require("es6-promisify");
25 const stat = promisify(fs.stat);
40 const promisify = require("es6-promisify");
44 const client = promisify(redis.send_command, redis);
66 const promisify = require("es6-promisify");
69 const single = promisify(test);
[all …]
/third_party/node/deps/npm/node_modules/copy-concurrently/
Dcopy.js18 function promisify (Promise, fn) { function
44 if (!opts.lstat) opts.lstat = promisify(opts.Promise, fs.lstat)
45 if (!opts.stat) opts.stat = promisify(opts.Promise, fs.stat)
46 if (!opts.chown) opts.chown = promisify(opts.Promise, fs.chown)
47 if (!opts.readdir) opts.readdir = promisify(opts.Promise, fs.readdir)
48 if (!opts.readlink) opts.readlink = promisify(opts.Promise, fs.readlink)
49 if (!opts.symlink) opts.symlink = promisify(opts.Promise, fs.symlink)
50 if (!opts.chmod) opts.chmod = promisify(opts.Promise, fs.chmod)
53 opts.mkdirpAsync = promisify(opts.Promise, mkdirp)
54 var rimrafAsync = promisify(opts.Promise, rimraf)
[all …]
/third_party/node/deps/npm/node_modules/libnpx/
Dutil.js3 module.exports.promisify = promisify
4 function promisify (f) { function
6 if (util.promisify) {
7 return util.promisify(f)
Dindex.js4 const promisify = require('./util.js').promisify constant
10 const which = promisify(require('which'))
85 return promisify(fs.readdir)(results.bin).then(bins => {
152 return promisify(rimraf)(bins).then(() => {
315 return promisify(fs.stat)(existing).then(stat => {
336 return promisify(fs.open)(existing, 'r').then(fd => {
337 return promisify(fs.read)(fd, buf, 0, bytecount, 0).then(() => {
338 return promisify(fs.close)(fd)
340 return promisify(fs.close)(fd).then(() => { throw err })
348 return promisify(fs.open)(existing, 'r').then(fd => {
[all …]
Dget-prefix.js3 const promisify = require('./util.js').promisify constant
6 const statAsync = promisify(require('fs').stat)
/third_party/node/deps/npm/node_modules/bin-links/
Dindex.js7 const linkIfExists = BB.promisify(gentleFs.linkIfExists)
8 const gentleFsBinLink = BB.promisify(gentleFs.binLink)
9 const open = BB.promisify(fs.open)
10 const close = BB.promisify(fs.close)
11 const read = BB.promisify(fs.read, {multiArgs: true})
12 const chmod = BB.promisify(fs.chmod)
13 const readFile = BB.promisify(fs.readFile)
14 const writeFileAtomic = BB.promisify(require('write-file-atomic'))
17 module.exports = BB.promisify(binLinks)
/third_party/node/deps/npm/node_modules/pacote/
Dextract.js7 const mkdirp = BB.promisify(require('mkdirp'))
11 const rimraf = BB.promisify(require('rimraf'))
14 const chown = BB.promisify(require('chownr'))
16 const truncateAsync = BB.promisify(fs.truncate)
17 const readFileAsync = BB.promisify(fs.readFile)
18 const appendFileAsync = BB.promisify(fs.appendFile)
/third_party/ejdb/src/bindings/ejdb2_node/
Dinstall.js27 const { promisify } = require('util');
31 const rimraf = promisify(require('rimraf'));
32 const extract = promisify(require('extract-zip'));
33 const readdir = promisify(fs.readdir);
57 const wdir = await promisify(fs.mkdtemp)(path.join(os.tmpdir(), 'ejdb2-node'));
/third_party/node/deps/npm/lib/install/action/
Dfinalize.js5 const rimraf = Bluebird.promisify(require('rimraf'))
6 const mkdirp = Bluebird.promisify(require('gentle-fs').mkdir)
7 const lstat = Bluebird.promisify(fs.lstat)
8 const readdir = Bluebird.promisify(fs.readdir)
9 const symlink = Bluebird.promisify(fs.symlink)
10 const gentlyRm = Bluebird.promisify(require('../../utils/gently-rm'))
Drefresh-package-json.js5 const checkPlatform = Bluebird.promisify(require('npm-install-checks').checkPlatform)
9 const readJson = Bluebird.promisify(require('read-package-json'))
10 const updatePackageJson = Bluebird.promisify(require('../update-package-json'))
/third_party/node/deps/npm/node_modules/read-package-tree/
Drealpath.js10 const promisify = require('util').promisify || require('util-promisify') constant
11 const readlink = promisify(fs.readlink)
12 const lstat = promisify(fs.lstat)
/third_party/node/deps/npm/node_modules/cacache/lib/util/
Dmove-file.js5 const chmod = BB.promisify(fs.chmod)
6 const unlink = BB.promisify(fs.unlink)
40 return BB.promisify(fs.stat)(dest).catch(err => {
/third_party/parse5/scripts/generate-parser-feedback-test/
Dindex.js2 const { promisify } = require('util');
11 readFile = promisify(readFile);
12 writeFile = promisify(writeFile);
/third_party/node/deps/npm/node_modules/pacote/lib/fetchers/
Dfile.js8 const pipe = BB.promisify(require('mississippi').pipe)
11 const readFileAsync = BB.promisify(fs.readFile)
12 const statAsync = BB.promisify(fs.stat)

1234567