Skip to content

Commit e03373d

Browse files
committed
✏️ improve readme
1 parent 1aa67ab commit e03373d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm install console-powers
2121

2222
## Usage
2323

24-
The library can be mentally split in two: **1)** `ii()` that aims to replace `console.log` + `tt()` that aims to replace `console.table`, **2)** the core API that allows doing advanced printing in the browser console. This is a getting started for **1)**. For **2)** see [API section](#api).
24+
The library can be mentally split in two: *1)* `ii()` that aims to replace `console.log` + `tt()` that aims to replace `console.table`, *2)* the core API that allows doing advanced printing in the browser console. This is a getting started for *1)*. For *2)* see [API section](#api).
2525

2626
1. Add `ii` and `tt` to the global scope so you can use it anywhere without importing it – just like `console.log`:
2727
```ts
@@ -36,7 +36,7 @@ The library can be mentally split in two: **1)** `ii()` that aims to replace `co
3636
```
3737
2. Use anywhere instead of `console.log` and `console.table`:
3838
```ts
39-
// ii() returns the first parameter you pass to it, so you can use it inline
39+
// use inline — ii() returns the first arg you pass to it
4040
const markdownTree = ii(await worker.parseMarkdownTree())
4141
```
4242

@@ -214,14 +214,19 @@ tt.pre = (value: unknown): unknown => {
214214
}
215215
```
216216

217-
### `addToGlobalScope()`
217+
<details>
218+
<summary><h3><code>console-powers/global</code><h3></summary>
219+
220+
#### `addToGlobalScope()`
218221

219222
Imported from `console-powers/global`. It adds `ii` and `tt` and it's TypeScript types to the global scope so you can use it anywhere without importing it – just like `console.log`.
220223

221-
### `addNoopToGlobalScope()`
224+
#### `addNoopToGlobalScope()`
222225

223226
Imported from `console-powers/global`. It adds empty/noop functions for `ii` and `tt` so if you accidentally forget a `ii` or `tt` call during development it won't crash in production.
224227

228+
</details>
229+
225230
<details>
226231
<summary><h3><code>consoleInspect()</code><h3></summary>
227232

0 commit comments

Comments
 (0)