Skip to content

Commit

Permalink
update changelog, readme, usage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
patinthehat authored and Patrick committed Feb 7, 2021
1 parent ea4bd66 commit fbd28c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ All notable changes to `permafrost-dev/node-ray` will be documented in this file

---

## 1.3.1 - unreleased
## 1.4.0 - 2021-02-07

- bump `find-up` package version to `5.0`

- add `error()` method to display information about errors

- add `date()` method to display information about a date

## 1.3.0 - 2021-02-07

- fix raw html displaying instead of rendered html with calls like `ray({hello: 'world'})`
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ See [using the package](docs/usage.md).
| `ray().clearAll()` | Clear current and all previous screens |
| `ray().className(obj)` | Display the classname for an object |
| `ray().count(name)` | Count how many times a piece of code is called, with optional name |
| `ray().date(date, format)` | Display a formatted date, the timezone, and its timestamp |
| `ray().die()` | Halt code execution - NodeJS only |
| `ray().disable()` | Disable sending stuff to Ray |
| `ray().disabled()` | Check if Ray is disabled |
Expand Down
9 changes: 9 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ const obj = new MyClass1();
ray().className(obj);
```

### Working with dates

Ray can display information about a date in a nicely formatted table using the `date()` method.
Specifying the format is optional. It uses the [dayjs formatting](https://day.js.org/docs/en/display/format) style.

```js
ray().date(new Date(), 'YYYY-MM-DD hh:mm');
```

### Feature demo

Here's a sample script that demonstrates a number of the features, both basic and advanced.
Expand Down

0 comments on commit fbd28c5

Please sign in to comment.