Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 1, 2019
1 parent a6be343 commit 4801a63
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ module.exports = {
return false;
}

// eslint-disable-next-line unicorn/no-for-loop
for (let i = 0; i < pathArray.length; i++) {
if (isObj(object)) {
if (!(pathArray[i] in object)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"ava": "^2.1.0",
"benchmark": "^2.1.4",
"tsd": "^0.7.2",
"xo": "^0.24.0"
"xo": "^0.25.3"
}
}
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ test('has', t => {

t.is(dotProp.has({'foo.baz': {bar: true}}, 'foo\\.baz.bar'), true);
t.is(dotProp.has({'fo.ob.az': {bar: true}}, 'fo\\.ob\\.az.bar'), true);
t.is(dotProp.has(undefined, 'fo\\.ob\\.az.bar'), false);
});

test('prevent setting/getting `__proto__`', t => {
Expand Down

0 comments on commit 4801a63

Please sign in to comment.