From ff7d79d5fc748e9eecefd0ddefdaa15a244849a7 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Fri, 26 Feb 2016 17:30:19 +0100 Subject: [PATCH] Remove custom rearg for `update`. --- fp/_mapping.js | 1 - test/test-fp.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fp/_mapping.js b/fp/_mapping.js index e31a20313..6226119ee 100644 --- a/fp/_mapping.js +++ b/fp/_mapping.js @@ -142,7 +142,6 @@ exports.methodRearg = { 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], - 'update': [2, 1, 0], 'zipWith': [1, 2, 0] }; diff --git a/test/test-fp.js b/test/test-fp.js index 5ee2b11ae..4ccea5041 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -697,7 +697,7 @@ assert.deepEqual(actual, { 'a': { 'c': 3 } }, 'fp.unset'); value = _.cloneDeep(deepObject); - actual = fp.update(function(x) { return x + 1; })('a.b')(value); + actual = fp.update('a.b')(function(x) { return x + 1; })(value); assert.deepEqual(value, deepObject, 'fp.update'); assert.deepEqual(actual, { 'a': { 'b': 3, 'c': 3 } }, 'fp.update'); @@ -773,7 +773,7 @@ assert.strictEqual(actual.d, value.d, 'fp.unset'); value = _.cloneDeep(object); - actual = fp.update(function(x) { return { 'c2': 2 }; }, 'a.b', value); + actual = fp.update('a.b', function(x) { return { 'c2': 2 }; }, value); assert.strictEqual(actual.d, value.d, 'fp.update'); }); }());