Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
env:
node: true

# enable ECMAScript features
ecmaFeatures:
blockBindings: true
templateStrings: true
octalLiterals: true
binaryLiterals: true
generators: true
forOf: true
objectLiteralShorthandProperties: true
objectLiteralShorthandMethods: true
classes: true

rules:
# Possible Errors
# list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
Expand Down Expand Up @@ -49,7 +37,7 @@ rules:
## require spaces operator like var sum = 1 + 1;
space-infix-ops: 2
## require spaces return, throw, case
space-return-throw-case: 2
keyword-spacing: 2
## no space before function, eg. 'function()'
space-before-function-paren: [2, "never"]
## require space before blocks, eg 'function() {}'
Expand All @@ -64,8 +52,6 @@ rules:
eol-last: 2
## no trailing spaces
no-trailing-spaces: 2
# require space after keywords, eg 'for (..)'
space-after-keywords: 2

# Strict Mode
# list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
Expand Down
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: "node_js"
node_js:
- "0.10"
- "0.12"
- "iojs"
- "4.0"
- node
- lts/*
script: npm run lint && npm run coveralls
14 changes: 7 additions & 7 deletions lib/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ module.exports = function merge(patch1, patch2) {
var patch = JSON.parse(JSON.stringify(patch1));

Object.keys(patch2)
.forEach(function(key) {
if (patch1[key] !== undefined) {
patch[key] = merge(patch1[key], patch2[key]);
} else {
patch[key] = patch2[key];
}
});
.forEach(function(key) {
if (patch1[key] !== undefined) {
patch[key] = merge(patch1[key], patch2[key]);
} else {
patch[key] = patch2[key];
}
});
return patch;
};
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"test": "test"
},
"devDependencies": {
"chai": "^3.2.0",
"coveralls": "^2.11.2",
"eslint": "^1.4.3",
"istanbul": "^0.3.11",
"mocha": "^2.3.2"
"chai": "^4.2.0",
"coveralls": "^3.1.0",
"eslint": "^7.0.0",
"istanbul": "^0.4.5",
"mocha": "^7.1.2"
},
"scripts": {
"test": "NODE_ENV=test mocha -b --reporter spec --recursive test",
"lint": "eslint ./lib ./index.js",
"coverage": "istanbul cover _mocha -- -R spec --recursive test",
"coveralls": "istanbul cover _mocha -- -R spec --recursive test; cat ./coverage/lcov.info | coveralls.js || true"
"coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --recursive test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"repository": {
"type": "git",
Expand All @@ -37,6 +37,6 @@
},
"homepage": "https://github.com/pierreinglebert/json-merge-patch",
"dependencies": {
"deep-equal": "^1.0.0"
"deep-equal": "^2.0.3"
}
}