thenify-all

WebJar for thenify-all

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

thenify-all
Last Version

Last Version

1.6.0
Release Date

Release Date

Type

Type

jar
Description

Description

thenify-all
WebJar for thenify-all
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/thenables/thenify-all

Download thenify-all

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/thenify-all/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>thenify-all</artifactId>
    <version>1.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/thenify-all/
implementation 'org.webjars.npm:thenify-all:1.6.0'
// https://jarcasting.com/artifacts/org.webjars.npm/thenify-all/
implementation ("org.webjars.npm:thenify-all:1.6.0")
'org.webjars.npm:thenify-all:jar:1.6.0'
<dependency org="org.webjars.npm" name="thenify-all" rev="1.6.0">
  <artifact name="thenify-all" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='thenify-all', version='1.6.0')
)
libraryDependencies += "org.webjars.npm" % "thenify-all" % "1.6.0"
[org.webjars.npm/thenify-all "1.6.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : thenify jar [3.1.0,4)

Project Modules

There are no modules declared in this project.

thenify-all

NPM version Build status Test coverage Dependency Status License Downloads Gittip

Promisifies all the selected functions in an object.

var thenifyAll = require('thenify-all');

var fs = thenifyAll(require('fs'), {}, [
  'readFile',
  'writeFile',
]);

fs.readFile(__filename).then(function (buffer) {
  console.log(buffer.toString());
});

API

var obj = thenifyAll(source, [obj], [methods])

Promisifies all the selected functions in an object.

  • source - the source object for the async functions
  • obj - the destination to set all the promisified methods
  • methods - an array of method names of source

var obj = thenifyAll.withCallback(source, [obj], [methods])

Promisifies all the selected functions in an object and backward compatible with callback.

  • source - the source object for the async functions
  • obj - the destination to set all the promisified methods
  • methods - an array of method names of source

thenifyAll.thenify

Exports thenify this package uses.

org.webjars.npm

Thenables

Promise-based JavaScript Modules

Versions

Version
1.6.0