We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
hasOwnProperty
1 parent 22d6a7c commit 796d566Copy full SHA for 796d566
lib/index.js
@@ -1,5 +1,6 @@
1
'use strict';
2
3
+const hasOwnProperty = Object.prototype.hasOwnProperty;
4
5
const internals = {
6
suspectRx: /"(?:_|\\u005f)(?:_|\\u005f)(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006f)(?:t|\\u0074)(?:o|\\u006f)(?:_|\\u005f)(?:_|\\u005f)"\s*\:/
@@ -65,7 +66,7 @@ exports.scan = function (obj, options) {
65
66
next = [];
67
68
for (const node of nodes) {
- if (Object.prototype.hasOwnProperty.call(node, '__proto__')) {
69
+ if (hasOwnProperty.call(node, '__proto__')) {
70
if (options.protoAction !== 'remove') {
71
throw new SyntaxError('Object contains forbidden prototype property');
72
}
0 commit comments