diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index abb7456bd..d5be1124c 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -25,7 +25,7 @@ var extend = require('lodash/fp/extend'); ## Convert -This module is used to convert Lodash methods into their `fp` counterparts. +This module is used to convert Lodash methods to their `fp` counterparts. ```js var convert = require('lodash/fp/convert'); @@ -42,7 +42,7 @@ var fp = convert({ var fp = convert(lodash.runInContext()); ``` -It’s customizable to create the `fp` wrapper that’s right for you. +It’s even customizable so you can create the `fp` function that’s right for you. ```js // Every option is `true` by default. var filter = convert('filter', _.filter, { @@ -58,7 +58,7 @@ var filter = convert('filter', _.filter, { 'rearg': true }); -// Set `cap` to `false` to create a wrapper that doesn’t cap iteratee arguments. +// Specify `cap` of `false` to create a function that doesn’t cap iteratee arguments. var filter = convert('filter', _.filter, { 'cap': false }); filter(function(value, index) { @@ -67,9 +67,21 @@ filter(function(value, index) { // => ['a', 'c'] ``` -## Notes +## Mapping -#### Arity +Immutable auto-curried iteratee-first data-last methods sound great, but what’s +that really mean for each method? Below is a breakdown of the mapping used to +convert each method. + +#### Capped Iteratee Arguments + +Methods which provide iteratees one argument:
+<%= toFuncList(_.keys(_.pick(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %> + +Methods which provide iteratees two arguments:
+<%= toFuncList(_.keys(_.pick(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %> + +#### Fixed Arity Methods with arity fixed to one argument:
<%= toFuncList(mapping.aryMethod[1]) %> @@ -83,20 +95,7 @@ Methods with arity fixed to three arguments:
Methods with arity fixed to four arguments:
<%= toFuncList(mapping.aryMethod[4]) %> -#### Iteratees - -Methods which provide iteratees one argument:
-<%= toFuncList(_.keys(_.pick(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %> - -Methods which provide iteratees two argument:
-<%= toFuncList(_.keys(_.pick(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %> - -#### New Methods - -Methods created to accommodate Lodash’s variadic methods:
-<%= toFuncList(_.keys(mapping.remap)) %> - -#### Argument Orders +#### Rearranged Arguments Methods fixed to two arguments have an argument order of
<%= toArgOrder(mapping.aryRearg[2]) %> @@ -115,6 +114,11 @@ Methods with custom argument orders:
Methods with unchanged argument orders:
<%= toFuncList(_.keys(mapping.skipRearg)) %> +#### New Methods + +Methods created to accommodate Lodash’s variadic methods:
+<%= toFuncList(_.keys(mapping.remap)) %> + #### Aliases There are <%= _.size(mapping.aliasToReal) %> method aliases: