You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ npm install secure-json-parse
38
38
## Usage
39
39
40
40
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.
42
42
43
43
```js
44
44
constsjson=require('secure-json-parse')
@@ -63,7 +63,7 @@ Parses a given JSON-formatted text into an object where:
63
63
- `'remove'` - deletes any `__proto__` keys from the result object.
64
64
- `'ignore'` - skips all validation (same as calling `JSON.parse()` directly).
65
65
-`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.
67
67
-`'remove'` - deletes any `constructor` keys from the result object.
68
68
-`'ignore'` - skips all validation (same as calling `JSON.parse()` directly).
69
69
@@ -76,7 +76,7 @@ Scans a given object for prototype properties where:
76
76
- `'error'` - throw a `SyntaxError` when a `__proto__` key is found. This is the default value.
77
77
- `'remove'` - deletes any `__proto__` keys from the input `obj`.
78
78
-`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.
80
80
-`'remove'` - deletes any `constructor` keys from the input `obj`.
0 commit comments