Skip to content

Commit

Permalink
opt: doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Oct 10, 2015
1 parent b15dfb5 commit bee4662
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ For more spec read [Unhandled Rejection Tracking Browser Events](https://github.

```js
var Promise = require('yaku');
var p = Promise.reject(10);
var p = Promise.reject(new Error("ERR"));

p['catch']((v) => {
console.log(v);
Expand Down Expand Up @@ -272,7 +272,7 @@ For more spec read [Unhandled Rejection Tracking Browser Events](https://github.

```js
var Promise = require('yaku');
var p = Promise.reject(10);
var p = Promise.reject(new Error("ERR"));
```

- ### **[Yaku.race(iterable)](src/yaku.js?source#L193)**
Expand Down Expand Up @@ -444,7 +444,7 @@ var source = require("yaku/lib/source");
any([
123,
Promise.resolve(0),
Promise.reject(1)
Promise.reject(new Error("ERR"))
])
.then((value) => {
console.log(value); // => 123
Expand Down Expand Up @@ -726,7 +726,7 @@ var source = require("yaku/lib/source");
);

// Emit error
linear.emit(Promise.reject("reason"));
linear.emit(Promise.reject(new Error("reason")));

// Dispose a specific source.
linear.children.splice(linear.children.indexOf(quad));
Expand Down
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
* any([
* 123,
* Promise.resolve(0),
* Promise.reject(1)
* Promise.reject(new Error("ERR"))
* ])
* .then((value) => {
* console.log(value); // => 123
Expand Down Expand Up @@ -241,7 +241,7 @@ module.exports = {
* );
*
* // Emit error
* linear.emit(Promise.reject("reason"));
* linear.emit(Promise.reject(new Error("reason")));
*
* // Dispose a specific source.
* linear.children.splice(linear.children.indexOf(quad));
Expand Down
4 changes: 2 additions & 2 deletions src/yaku.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
* @example
* ```js
* var Promise = require('yaku');
* var p = Promise.reject(10);
* var p = Promise.reject(new Error("ERR"));
*
* p['catch']((v) => {
* console.log(v);
Expand Down Expand Up @@ -163,7 +163,7 @@
* @example
* ```js
* var Promise = require('yaku');
* var p = Promise.reject(10);
* var p = Promise.reject(new Error("ERR"));
* ```
*/
Yaku.reject = function reject (reason) {
Expand Down

0 comments on commit bee4662

Please sign in to comment.