Skip to content

Commit

Permalink
Merge pull request #687 from Yago/main
Browse files Browse the repository at this point in the history
Fix small JavaScript related documentations
  • Loading branch information
freekmurze authored May 2, 2022
2 parents b18c261 + 3b819fc commit c11d10c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions docs/usage/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ ray().hideApp();
Ray can display payloads of several types, including JSON, file contents, images, XML, and HTML.

```js
ray().json('['a' => 1, 'b' => ['c' => 3]]');
ray().json('{ "name": "my object" }');

ray().toJson({name: 'my object'});
ray().toJson({ name: 'my object' });

ray().file('test.txt');

Expand Down Expand Up @@ -172,7 +172,7 @@ ray().table(['John', 'Paul', 'George', 'Ringo'], 'Beatles');
Ray can count the number of times a piece of code is called, optionally with a specific name.

```js
for(const n in [...Array(12).keys()]) {
for (const n in [...Array(12).keys()]) {
ray().count('first');
}

Expand Down Expand Up @@ -435,15 +435,15 @@ To only send a payload once, use the `once` function. This is useful for debugg
```js
for(let i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
ray().once($i); // only sends "0"
}
```
You can also use `once` without arguments. Any function you chain on `once` will also only be called once.
```php
for(let i = 0; i < 10; i++) {
```js
for (let i = 0; i < 10; i++) {
ray().once().html(`<strong>${i}</strong>`); // only sends "<strong>0</strong>"
}
```
Expand Down
10 changes: 5 additions & 5 deletions docs/usage/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ ray().hideApp();
Ray can display payloads of several types, including JSON, file contents, images, XML, and HTML.

```js
ray().json('['a' => 1, 'b' => ['c' => 3]]');
ray().json('{ "name": "my object" }');

ray().toJson({name: 'my object'});
ray().toJson({ name: 'my object' });

ray().file('test.txt');

Expand Down Expand Up @@ -435,15 +435,15 @@ To only send a payload once, use the `once` function. This is useful for debugg
```js
for(let i = 0; i < 10; i++) {
for (let i = 0; i < 10; i++) {
ray().once($i); // only sends "0"
}
```
You can also use `once` without arguments. Any function you chain on `once` will also only be called once.
```php
for(let i = 0; i < 10; i++) {
```js
for (let i = 0; i < 10; i++) {
ray().once().html(`<strong>${i}</strong>`); // only sends "<strong>0</strong>"
}
```
Expand Down
8 changes: 4 additions & 4 deletions docs/usage/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Read more on [Craft](/docs/ray/v1/usage/craft)
| `ray(variable)` | Display a string, array or object |
| `ray(variable, another, …)` | Ray accepts multiple arguments |
| `ray(…).blue()` | Output in color. Use `green`, `orange`, `red`, `blue`,`purple` or `gray` |
| `ray()->caller()` | Discover where code is being called |
| `ray().caller()` | Discover where code is being called |
| `ray().clearScreen()` | Clear current screen |
| `ray().clearAll()` | Clear current and all previous screens |
| `ray().count(name)` | Count how many times a piece of code is called, with optional name |
Expand Down Expand Up @@ -232,7 +232,7 @@ Read more on [Craft](/docs/ray/v1/usage/craft)
| `ray(…).small()` | Output text smaller or bigger. Use `large` or `small`|
| `ray().stopTime(name)` | Removes a named stopwatch if specified, otherwise removes all stopwatches |
| `ray().table(…)` | Display an array of items or an object formatted as a table; Objects and arrays are pretty-printed |
| `ray()->trace()` | Check entire backtrace |
| `ray().trace()` | Check entire backtrace |
| `ray().xml(string)` | Send XML to Ray |

## NodeJS
Expand All @@ -242,7 +242,7 @@ Read more on [Craft](/docs/ray/v1/usage/craft)
| `ray(variable)` | Display a string, array or object |
| `ray(variable, another, …)` | Ray accepts multiple arguments |
| `ray(…).blue()` | Output in color. Use `green`, `orange`, `red`, `blue`,`purple` or `gray` |
| `ray()->caller()` | Discover where code is being called |
| `ray().caller()` | Discover where code is being called |
| `ray().clearScreen()` | Clear current screen |
| `ray().clearAll()` | Clear current and all previous screens |
| `ray().count(name)` | Count how many times a piece of code is called, with optional name |
Expand Down Expand Up @@ -282,7 +282,7 @@ Read more on [Craft](/docs/ray/v1/usage/craft)
| `ray(…).small()` | Output text smaller or bigger. Use `large` or `small`|
| `ray().stopTime(name)` | Removes a named stopwatch if specified, otherwise removes all stopwatches |
| `ray().table(…)` | Display an array of items or an object formatted as a table; Objects and arrays are pretty-printed |
| `ray()->trace()` | Check entire backtrace |
| `ray().trace()` | Check entire backtrace |
| `ray().xml(string)` | Send XML to Ray |

## Vue
Expand Down

0 comments on commit c11d10c

Please sign in to comment.