diff --git a/README.md b/README.md index df188fd..f0c8d83 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ See [using the package](docs/usage.md). | `ray(…).blue()` | Output in color. Use `green`, `orange`, `red`, `blue`,`purple` or `gray` | | `ray().clearScreen()` | Clear current screen | | `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().disable()` | Disable sending stuff to Ray | | `ray().disabled()` | Check if Ray is disabled | diff --git a/docs/usage.md b/docs/usage.md index 1b2f974..c96b64e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -167,6 +167,16 @@ Ray can display information about an `Error` or exception with the `error` metho ray().error(new Error('my error message')); ``` +### Displaying class information + +You can display the classname of an object with `className()`. + +```js +const obj = new MyClass1(); + +ray().className(obj); +``` + ### Feature demo Here's a sample script that demonstrates a number of the features, both basic and advanced.