Skip to content

Commit

Permalink
fix(docs): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Mar 19, 2017
1 parent b3edc4e commit 56e97a4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const {%= varname %} = require('{%= name %}')
## API
{%= apidocs('index.js') %}

**Tip:** You can use `require('native-or-another/register')` instead of passing
a promise to `opts.Promise`, it exposes a function that accepts same
options object, `{ Promise: MyPromise }` for example.

### Detecting Promise
> For testing and such purposes you may want to detect which promise is used. Because of that
the returned promise has `promise.___nativePromise` which will be `true` if native Promise
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,12 @@ const redolent = require('redolent')

## API

### [redolent](index.js#L86)
Will try to promisify `fn` with native Promise, otherwise you can give different promise module to `opts.Promise`, for example [pinkie][] or [bluebird][]. If `fn` [is-async-function][] it will be passed with `done` callback as last argument - always concatenated with the other provided args through `opts.args`.
### [redolent](index.js#L82)
> Will try to promisify `fn` with native Promise, otherwise you can give different promise module to `opts.Promise`, for example [pinkie][] or [bluebird][]. If `fn` [is-async-function][] it will be passed with `done` callback as last argument - always concatenated with the other provided args through `opts.args`.
_**Note:** Uses [native-or-another][] for detection, so it will always will use the
**Note:** Uses [native-or-another][] for detection, so it will always will use the
native Promise, otherwise will try to load some of the common promise libraries
and as last resort if can't find one of them installed, then throws an Error!_
**Tip:** You can use `require('native-or-another/register')` instead of passing
a promise to `opts.Promise`, it exposes a function that accepts same
options object, `{ Promise: MyPromise }` for example.
and as last resort if can't find one of them installed, then throws an Error!

**Params**

Expand Down Expand Up @@ -99,6 +96,10 @@ fn(3, 5).then((res) => {
})
```

**Tip:** You can use `require('native-or-another/register')` instead of passing
a promise to `opts.Promise`, it exposes a function that accepts same
options object, `{ Promise: MyPromise }` for example.

### Detecting Promise
> For testing and such purposes you may want to detect which promise is used. Because of that
the returned promise has `promise.___nativePromise` which will be `true` if native Promise
Expand Down Expand Up @@ -176,7 +177,7 @@ Copyright © 2015, 2017, [Charlike Mike Reagent](https://i.am.charlike.online).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 17, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 19, 2017._
_Project scaffolded using [charlike][] cli._

[always-done]: https://github.com/hybridables/always-done
Expand Down
10 changes: 3 additions & 7 deletions dist/redolent.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1656,20 +1656,16 @@ var index$16 = function isAsyncFunction (fn, names, strict) {
};

/**
* Will try to promisify `fn` with native Promise,
* > Will try to promisify `fn` with native Promise,
* otherwise you can give different promise module
* to `opts.Promise`, for example [pinkie][] or [bluebird][].
* If `fn` [is-async-function][] it will be passed with `done` callback
* as last argument - always concatenated with the other provided args
* through `opts.args`.
*
* _**Note:** Uses [native-or-another][] for detection, so it will always will use the
* **Note:** Uses [native-or-another][] for detection, so it will always will use the
* native Promise, otherwise will try to load some of the common promise libraries
* and as last resort if can't find one of them installed, then throws an Error!_
*
* **Tip:** You can use `require('native-or-another/register')` instead of passing
* a promise to `opts.Promise`, it exposes a function that accepts same
* options object, `{ Promise: MyPromise }` for example.
* and as last resort if can't find one of them installed, then throws an Error!
*
* **Example**
*
Expand Down
10 changes: 3 additions & 7 deletions dist/redolent.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -1654,20 +1654,16 @@ var index$16 = function isAsyncFunction (fn, names, strict) {
};

/**
* Will try to promisify `fn` with native Promise,
* > Will try to promisify `fn` with native Promise,
* otherwise you can give different promise module
* to `opts.Promise`, for example [pinkie][] or [bluebird][].
* If `fn` [is-async-function][] it will be passed with `done` callback
* as last argument - always concatenated with the other provided args
* through `opts.args`.
*
* _**Note:** Uses [native-or-another][] for detection, so it will always will use the
* **Note:** Uses [native-or-another][] for detection, so it will always will use the
* native Promise, otherwise will try to load some of the common promise libraries
* and as last resort if can't find one of them installed, then throws an Error!_
*
* **Tip:** You can use `require('native-or-another/register')` instead of passing
* a promise to `opts.Promise`, it exposes a function that accepts same
* options object, `{ Promise: MyPromise }` for example.
* and as last resort if can't find one of them installed, then throws an Error!
*
* **Example**
*
Expand Down
10 changes: 3 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ var Promize = require('native-or-another')
var isAsync = require('is-async-function')

/**
* Will try to promisify `fn` with native Promise,
* > Will try to promisify `fn` with native Promise,
* otherwise you can give different promise module
* to `opts.Promise`, for example [pinkie][] or [bluebird][].
* If `fn` [is-async-function][] it will be passed with `done` callback
* as last argument - always concatenated with the other provided args
* through `opts.args`.
*
* _**Note:** Uses [native-or-another][] for detection, so it will always will use the
* **Note:** Uses [native-or-another][] for detection, so it will always will use the
* native Promise, otherwise will try to load some of the common promise libraries
* and as last resort if can't find one of them installed, then throws an Error!_
*
* **Tip:** You can use `require('native-or-another/register')` instead of passing
* a promise to `opts.Promise`, it exposes a function that accepts same
* options object, `{ Promise: MyPromise }` for example.
* and as last resort if can't find one of them installed, then throws an Error!
*
* **Example**
*
Expand Down

0 comments on commit 56e97a4

Please sign in to comment.