Skip to content

Commit

Permalink
docs(README): added explanation about promise logs
Browse files Browse the repository at this point in the history
  • Loading branch information
helderberto committed Jan 16, 2020
1 parent e321256 commit cd1e00e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ Logger.warn('Warning message example.');
// => ⚠️ Warning message example
Logger.info('Information message example.');
// => ℹ️ Informational message example

// PROMISE STATUSES LOGS
Logger.pending('Promise message example.', { hello: true });
// => ℹ️ Promise message example | pending {"hello":true}

Logger.fulfilled('Promise message example.', { hello: true });
// => ✅ Promise message example | fulfilled {"hello":true}

Logger.rejected('Promise message example.', { hello: true });
// => 🚫 Promise message example | rejected {"hello":true}

Logger.settled('Promise message example.', { hello: true });
// => ✅ Promise message example | settled {"hello":true}
```

### With require
Expand All @@ -43,8 +56,23 @@ Logger.warn('Warning message example.');
// => ⚠️ Warning message example
Logger.info('Information message example.');
// => ℹ️ Informational message example

// PROMISE STATUSES LOGS
Logger.pending('Promise message example.', { hello: true });
// => ℹ️ Promise message example | pending {"hello":true}

Logger.fulfilled('Promise message example.', { hello: true });
// => ✅ Promise message example | fulfilled {"hello":true}

Logger.rejected('Promise message example.', { hello: true });
// => 🚫 Promise message example | rejected {"hello":true}

Logger.settled('Promise message example.', { hello: true });
// => ✅ Promise message example | settled {"hello":true}
```

_Note: All promises convert objects to strings_

### Change Emojis

Is it possible to change emojis for each message? **Yes**! Check it out:
Expand Down

0 comments on commit cd1e00e

Please sign in to comment.