Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Apr 17, 2024
1 parent d4665b4 commit a7aa534
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ Import:
```js
import {
parseJSON5,
stringifyJSON5,
parseJSONC,
stringifyJSONC,
parseYAML,
stringifyYAML,
parseTOML,
stringifyTOML,
parseJSON,
stringifyJSON,
parseTOML,
stringifyTOML,
} from "confbox";
```

Expand All @@ -85,13 +87,15 @@ import {
```js
const {
parseJSON5,
stringifyJSON5,
parseJSONC,
stringifyJSONC,
parseYAML,
stringifyYAML,
parseTOML,
stringifyTOML,
parseJSON,
stringifyJSON,
parseTOML,
stringifyTOML,
} = require("confbox");
```

Expand All @@ -100,13 +104,15 @@ const {
```js
import {
parseJSON5,
stringifyJSON5,
parseJSONC,
stringifyJSONC,
parseYAML,
stringifyYAML,
parseTOML,
stringifyTOML,
parseJSON,
stringifyJSON,
parseTOML,
stringifyTOML,
} from "https://esm.sh/confbox";
```

Expand Down Expand Up @@ -142,6 +148,14 @@ Converts a JavaScript value to a [JSON](https://www.json.org/json-en.html) strin

Indentation status is auto detected and preserved when using value from parseJSON.

### `stringifyJSON5(value, options?)`

Converts a JavaScript value to a [JSON5](https://json5.org/) string.

### `stringifyJSONC(value, options?)`

Converts a JavaScript value to a [JSONC](https://github.com/microsoft/node-jsonc-parser) string.

### `stringifyTOML(value)`

Converts a JavaScript value to a [TOML](https://toml.io/) string.
Expand Down

0 comments on commit a7aa534

Please sign in to comment.