Skip to content

Commit 1a7c5ba

Browse files
authored
docs: Correct parameters of a tokenizing example
1 parent a6ea466 commit 1a7c5ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ The [`print`](#pretty-printing) method accepts an object `options` as the second
207207
| --------------------------- | ------------------------------------------------------- |
208208
| `indent` | count of spaces or the specific characters to be used as an indentation unit |
209209
| `pruneComments` | will omit all tokens with comments |
210-
| `stripObjectKeys` | will not print quotes around object keys which are JavaScript identifier names |
210+
| `stripObjectKeys` | will not print quotes around object keys which are JavaScript identifier names |
211211
| `enforceDoubleQuotes` | will surround all strings with double quotes |
212212
| `enforceSingleQuotes` | will surround all strings with single quotes |
213213
| `trimTrailingCommas` | will omit all trailing commas after the last object entry or array item |
@@ -243,7 +243,10 @@ The method `tokenize` has the same prototype as the method [`parse`](#module-int
243243

244244
```js
245245
const { tokenize } = require('@prantlf/jsonlint')
246-
const tokens = tokenize('{"flag":true /* default */}', { ignoreComments: true }))
246+
const tokens = tokenize('{"flag":true /* default */}', {
247+
ignoreComments: true,
248+
rawTokens: true
249+
}))
247250
// Returns the following array:
248251
// [
249252
// { type: 'symbol', raw: '{', value: '{' },

0 commit comments

Comments
 (0)