Skip to content

Commit 4a39a3c

Browse files
committed
Updated README.md
1 parent 0156887 commit 4a39a3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ npm install secure-json-parse
3838
## Usage
3939

4040
Pass the option object as a second (or third) parameter for configuring the action to take in case of a bad JSON, if nothing is configured, the default is to throw a `SyntaxError`.<br/>
41-
You can choose which action to perform in case `__proto__` is present, and in case `constructor` is present.
41+
You can choose which action to perform in case `__proto__` is present, and in case `constructor.prototype` is present.
4242

4343
```js
4444
const sjson = require('secure-json-parse')
@@ -63,7 +63,7 @@ Parses a given JSON-formatted text into an object where:
6363
- `'remove'` - deletes any `__proto__` keys from the result object.
6464
- `'ignore'` - skips all validation (same as calling `JSON.parse()` directly).
6565
- `constructorAction` - optional string with one of:
66-
- `'error'` - throw a `SyntaxError` when a `constructor` key is found. This is the default value.
66+
- `'error'` - throw a `SyntaxError` when a `constructor.prototype` key is found. This is the default value.
6767
- `'remove'` - deletes any `constructor` keys from the result object.
6868
- `'ignore'` - skips all validation (same as calling `JSON.parse()` directly).
6969

@@ -76,7 +76,7 @@ Scans a given object for prototype properties where:
7676
- `'error'` - throw a `SyntaxError` when a `__proto__` key is found. This is the default value.
7777
- `'remove'` - deletes any `__proto__` keys from the input `obj`.
7878
- `constructorAction` - optional string with one of:
79-
- `'error'` - throw a `SyntaxError` when a `constructor` key is found. This is the default value.
79+
- `'error'` - throw a `SyntaxError` when a `constructor.prototype` key is found. This is the default value.
8080
- `'remove'` - deletes any `constructor` keys from the input `obj`.
8181

8282
## Benchmarks

0 commit comments

Comments
 (0)