thenify-all

WebJar for thenify-all

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

thenify-all
Последняя версия

Последняя версия

1.6.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

thenify-all
WebJar for thenify-all
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

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

Скачать thenify-all

Как подключить последнюю версию

<!-- 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"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : thenify jar [3.1.0,4)

Модули Проекта

Данный проект не имеет модулей.

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

Версии библиотеки

Версия
1.6.0