open-index/open-npm huggingface dataset:
npm package: @jokeyrhyme/pify-fs
Description: the Node.js fs module, safer via graceful-fs, and more convenient via pify
Latest version: 1.0.1

# pify-fs [![npm](https://img.shields.io/npm/v/@jokeyrhyme/pify-fs.svg?maxAge=2592000)](https://www.npmjs.com/package/@jokeyrhyme/pify-fs) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/jokeyrhyme/pify-fs?branch=master&svg=true)](https://ci.appveyor.com/project/jokeyrhyme/pify-fs) [![Travis CI Status](https://travis-ci.org/jokeyrhyme/pify-fs.svg?branch=master)](https://travis-ci.org/jokeyrhyme/pify-fs)

the Node.js fs module, safer via graceful-fs, and more convenient via pify


## What is this?

I frequently use the awesome [graceful-fs](https://www.npmjs.com/package/graceful-fs) wrapper in combination with the convenient [pify](https://www.npmjs.com/package/pify) wrapper.

I got tired of doing this over and over again, so I made this module.


## Usage

```js
const fs = require('@jokeyrhyme/pify-fs')

fs.readdir(process.cwd())
  .then((files) => assert(Array.isArray(files)))
```
npm package: @jokeyrhyme/promised-requirejs
Description: a Promise interface for loading AMD modules via Require.js
Author: Ron Waldon
Latest version: 1.0.0

# promised-requirejs

a Promise interface for loading AMD modules via Require.js

[![npm module](https://img.shields.io/npm/v/@jokeyrhyme/promised-requirejs.svg)](https://www.npmjs.com/package/@jokeyrhyme/promised-requirejs)
[![travis-ci](https://img.shields.io/travis/jokeyrhyme/promised-requirejs.js.svg)](https://travis-ci.org/jokeyrhyme/promised-requirejs.js)

## API

[dist/index.js](dist/index.js) exports a CommonJS module, an AMD module, or a
global `promisedRequire` variable.


### `promisedRequire(name, retries=0)`

- @param {(`String`|`String[]`)} name - module(s) that you wish to load
- @param {`Number`} [retries=0] - number of extra attempts in case of error
- @returns {`Promise`}

The Promise resolve-handler has the value of the module as its first argument.

If requesting an Array of modules, then the Promise resolve-handler has an Array
of the modules' values as its first argument.

#### Examples

Require.js:

```js
require([
  'bacon', 'moment'
], function (Bacon, Moment) {
  /* TODO: ... */
}, function (err) {
  /* TODO: ... */  
});
```

promisedRequire (ES5):

```js
promisedRequire(['bacon', 'moment'])
.then(function (results) {
  var Bacon = results[0];
  var Moment = results[1];
  /* TODO: ... */
})
.catch(function (err) {
  /* TODO: ... */  
});
```

promisedRequire (ES2015):

```js
promisedRequire(['bacon', 'moment'])
.then(([ Bacon, Moment ]) => {
  /* TODO: ... */
})
.catch(function (err) {
  /* TODO: ... */  
});
```
npm package: @jokeyrhyme/promisify
Description: wrap a Node.js-style asynchronous function so that it returns a Promise
Latest version: 1.0.0
Deprecated: ABANDONED: use pify instead

# promisify.js

wrap a Node.js-style asynchronous function so that it returns a Promise

[![npm module](https://img.shields.io/npm/v/@jokeyrhyme/promisify.svg)](https://www.npmjs.com/package/@jokeyrhyme/promisify)
[![Build Status](https://travis-ci.org/jokeyrhyme/promisify.js.png)](https://travis-ci.org/jokeyrhyme/promisify.js)


## Usage

```js
const promisify = require('@jokeyrhyme/promisify');

const fs = require('fs');

const readdir = promisify(fs.readdir);

fs.readdir(process.cwd())
  .then((result) => { /* ... */ })
  .catch((err) => { /* ... */ });
```


## API


### `promisify (context?: Object, Function) => Promiser`

```
interface Promiser {
  (...args: Any[]) => Promise
}
```


## Related

- callbackify: https://github.com/jokeyrhyme/callbackify.js