From 60ac7cfe74a59ea287e12a90817e1aa2417f3877 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 5 Nov 2015 15:07:53 -0600 Subject: [PATCH] Add `conj`, `disj`, and `juxt` to `aryMethodMap`. --- lib/fp/mapping.js | 6 +++--- test/test.fp.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/fp/mapping.js b/lib/fp/mapping.js index a87e391b3..4f8f52c71 100644 --- a/lib/fp/mapping.js +++ b/lib/fp/mapping.js @@ -75,9 +75,9 @@ module.exports = { /** Used to map ary to method names. */ 'aryMethodMap': { 1: ( - 'attempt,ceil,create,curry,floor,fromPairs,iteratee,invert,memoize,method,' + - 'methodOf,mixin,rest,reverse,round,runInContext,template,trim,trimLeft,' + - 'trimRight,uniqueId,words').split(','), + 'attempt,ceil,conj,create,curry,disj,floor,fromPairs,iteratee,invert,juxt,' + + 'memoize,method,methodOf,mixin,rest,reverse,round,runInContext,template,trim,' + + 'trimLeft,trimRight,uniqueId,words').split(','), 2: ( 'ary,assign,at,bind,bindKey,cloneDeepWith,cloneWith,countBy,curryN,debounce,' + 'defaults,defaultsDeep,delay,difference,drop,dropRight,dropRightWhile,' + diff --git a/test/test.fp.js b/test/test.fp.js index fce25e5b3..4c2e3b65d 100644 --- a/test/test.fp.js +++ b/test/test.fp.js @@ -37,11 +37,11 @@ QUnit.module('method aliases'); var actual = _.transform(mapping.aliasMap, function(result, aliases, methodName) { var func = fp[methodName]; _.each(aliases, function(alias) { - result.push(fp[alias] === func); + result.push([alias, fp[alias] === func]); }); }, []); - assert.ok(_.every(actual)); + assert.deepEqual(_.reject(actual, 1), []); }); }()); @@ -54,8 +54,8 @@ QUnit.module('method ary caps'); assert.expect(1); var funcMethods = [ - 'curry', 'iteratee', 'memoize', 'method', 'methodOf', - 'restParam', 'runInContext' + 'conj', 'curry', 'disj', 'iteratee', 'juxt', 'memoize', + 'method', 'methodOf', 'restParam', 'runInContext' ]; var exceptions = funcMethods.concat('mixin', 'template'),