Skip to content

Commit b43cc8c

Browse files
committedOct 10, 2020
Slightly improve performances for set() and update dev dependencies
1 parent b45fb77 commit b43cc8c

File tree

4 files changed

+2782
-8
lines changed

4 files changed

+2782
-8
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ npm-debug.log
55
generated
66
coverage
77
.DS_Store
8+
.nyc_output

‎index.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,15 @@
8383
}, {});
8484
};
8585

86-
function hasShallowProperty(obj, prop) {
87-
return (options.includeInheritedProps || (typeof prop === 'number' && Array.isArray(obj)) || hasOwnProperty(obj, prop))
86+
var hasShallowProperty
87+
if (options.includeInheritedProps) {
88+
hasShallowProperty = function () {
89+
return true
90+
}
91+
} else {
92+
hasShallowProperty = function (obj, prop) {
93+
return (typeof prop === 'number' && Array.isArray(obj)) || hasOwnProperty(obj, prop)
94+
}
8895
}
8996

9097
function getShallowProperty(obj, prop) {

‎package-lock.json

+2,763
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
},
1616
"devDependencies": {
1717
"@mariocasciaro/benchpress": "^0.1.3",
18-
"chai": "^4.1.2",
19-
"coveralls": "^2.11.2",
20-
"istanbul": "^0.4.4",
21-
"mocha": "^2.2.4",
22-
"mocha-lcov-reporter": "^1.2.0"
18+
"chai": "^4.2.0",
19+
"coveralls": "^3.1.0",
20+
"nyc": "^15.1.0",
21+
"mocha": "^8.1.3",
22+
"mocha-lcov-reporter": "^1.3.0"
2323
},
2424
"scripts": {
25-
"test": "istanbul cover ./node_modules/mocha/bin/_mocha test.js --report html -- -R spec"
25+
"test": "mocha test.js",
26+
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
27+
"coverage": "nyc npm test",
28+
"benchmark": "node benchmark.js"
2629
},
2730
"keywords": [
2831
"deep",

0 commit comments

Comments
 (0)
Please sign in to comment.