Bump to v4.8.0.

This commit is contained in:
John-David Dalton
2016-04-01 23:28:00 -07:00
parent 18d0f1d873
commit ee6ec2f672
385 changed files with 2374 additions and 1044 deletions

View File

@@ -1,6 +1,6 @@
# lodash v4.7.0 # lodash v4.8.0
The [lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
## Installation ## Installation
@@ -28,11 +28,11 @@ var chunk = require('lodash/chunk');
var extend = require('lodash/fp/extend'); var extend = require('lodash/fp/extend');
``` ```
See the [package source](https://github.com/lodash/lodash/tree/4.7.0-npm) for more details. See the [package source](https://github.com/lodash/lodash/tree/4.8.0-npm) for more details.
**Note:**<br> **Note:**<br>
Dont assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br> Dont assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br>
Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes `lodash` by default.
## Support ## Support

View File

@@ -5,7 +5,7 @@
* @private * @private
* @param {Function} func The function to invoke. * @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`. * @param {*} thisArg The `this` binding of `func`.
* @param {...*} args The arguments to invoke `func` with. * @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`. * @returns {*} Returns the result of `func`.
*/ */
function apply(func, thisArg, args) { function apply(func, thisArg, args) {

View File

@@ -1,5 +1,6 @@
var baseIsMatch = require('./_baseIsMatch'), var baseIsMatch = require('./_baseIsMatch'),
getMatchData = require('./_getMatchData'); getMatchData = require('./_getMatchData'),
matchesStrictComparable = require('./_matchesStrictComparable');
/** /**
* The base implementation of `_.matches` which doesn't clone `source`. * The base implementation of `_.matches` which doesn't clone `source`.
@@ -11,16 +12,7 @@ var baseIsMatch = require('./_baseIsMatch'),
function baseMatches(source) { function baseMatches(source) {
var matchData = getMatchData(source); var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) { if (matchData.length == 1 && matchData[0][2]) {
var key = matchData[0][0], return matchesStrictComparable(matchData[0][0], matchData[0][1]);
value = matchData[0][1];
return function(object) {
if (object == null) {
return false;
}
return object[key] === value &&
(value !== undefined || (key in Object(object)));
};
} }
return function(object) { return function(object) {
return object === source || baseIsMatch(object, source, matchData); return object === source || baseIsMatch(object, source, matchData);

View File

@@ -1,6 +1,9 @@
var baseIsEqual = require('./_baseIsEqual'), var baseIsEqual = require('./_baseIsEqual'),
get = require('./get'), get = require('./get'),
hasIn = require('./hasIn'); hasIn = require('./hasIn'),
isKey = require('./_isKey'),
isStrictComparable = require('./_isStrictComparable'),
matchesStrictComparable = require('./_matchesStrictComparable');
/** Used to compose bitmasks for comparison styles. */ /** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1, var UNORDERED_COMPARE_FLAG = 1,
@@ -15,6 +18,9 @@ var UNORDERED_COMPARE_FLAG = 1,
* @returns {Function} Returns the new function. * @returns {Function} Returns the new function.
*/ */
function baseMatchesProperty(path, srcValue) { function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(path, srcValue);
}
return function(object) { return function(object) {
var objValue = get(object, path); var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue) return (objValue === undefined && objValue === srcValue)

View File

@@ -11,8 +11,8 @@ var baseCreate = require('./_baseCreate'),
*/ */
function createCtorWrapper(Ctor) { function createCtorWrapper(Ctor) {
return function() { return function() {
// Use a `switch` statement to work with class constructors. // Use a `switch` statement to work with class constructors. See
// See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details. // for more details.
var args = arguments; var args = arguments;
switch (args.length) { switch (args.length) {

View File

@@ -1,6 +1,5 @@
var apply = require('./_apply'), var apply = require('./_apply'),
arrayMap = require('./_arrayMap'), arrayMap = require('./_arrayMap'),
baseFlatten = require('./_baseFlatten'),
baseIteratee = require('./_baseIteratee'), baseIteratee = require('./_baseIteratee'),
rest = require('./rest'); rest = require('./rest');
@@ -13,7 +12,7 @@ var apply = require('./_apply'),
*/ */
function createOver(arrayFunc) { function createOver(arrayFunc) {
return rest(function(iteratees) { return rest(function(iteratees) {
iteratees = arrayMap(baseFlatten(iteratees, 1), baseIteratee); iteratees = arrayMap(iteratees, baseIteratee);
return rest(function(args) { return rest(function(args) {
var thisArg = this; var thisArg = this;
return arrayFunc(iteratees, function(iteratee) { return arrayFunc(iteratees, function(iteratee) {

View File

@@ -6,9 +6,8 @@ var apply = require('./_apply'),
var BIND_FLAG = 1; var BIND_FLAG = 1;
/** /**
* Creates a function that wraps `func` to invoke it with the optional `this` * Creates a function that wraps `func` to invoke it with the `this` binding
* binding of `thisArg` and the `partials` prepended to those provided to * of `thisArg` and `partials` prepended to the arguments it receives.
* the wrapper.
* *
* @private * @private
* @param {Function} func The function to wrap. * @param {Function} func The function to wrap.

View File

@@ -78,7 +78,8 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
case regexpTag: case regexpTag:
case stringTag: case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects, // Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See https://es5.github.io/#x15.10.6.4 for more details. // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + ''); return object == (other + '');
case mapTag: case mapTag:

View File

@@ -2,7 +2,8 @@ var DataView = require('./_DataView'),
Map = require('./_Map'), Map = require('./_Map'),
Promise = require('./_Promise'), Promise = require('./_Promise'),
Set = require('./_Set'), Set = require('./_Set'),
WeakMap = require('./_WeakMap'); WeakMap = require('./_WeakMap'),
toSource = require('./_toSource');
/** `Object#toString` result references. */ /** `Object#toString` result references. */
var mapTag = '[object Map]', var mapTag = '[object Map]',
@@ -16,21 +17,19 @@ var dataViewTag = '[object DataView]';
/** Used for built-in method references. */ /** Used for built-in method references. */
var objectProto = Object.prototype; var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/** /**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
/** Used to detect maps, sets, and weakmaps. */ /** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = DataView ? (DataView + '') : '', var dataViewCtorString = toSource(DataView),
mapCtorString = Map ? funcToString.call(Map) : '', mapCtorString = toSource(Map),
promiseCtorString = Promise ? funcToString.call(Promise) : '', promiseCtorString = toSource(Promise),
setCtorString = Set ? funcToString.call(Set) : '', setCtorString = toSource(Set),
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; weakMapCtorString = toSource(WeakMap);
/** /**
* Gets the `toStringTag` of `value`. * Gets the `toStringTag` of `value`.
@@ -53,7 +52,7 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
getTag = function(value) { getTag = function(value) {
var result = objectToString.call(value), var result = objectToString.call(value),
Ctor = result == objectTag ? value.constructor : null, Ctor = result == objectTag ? value.constructor : null,
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; ctorString = toSource(Ctor);
if (ctorString) { if (ctorString) {
switch (ctorString) { switch (ctorString) {

View File

@@ -16,29 +16,25 @@ var baseCastPath = require('./_baseCastPath'),
* @returns {boolean} Returns `true` if `path` exists, else `false`. * @returns {boolean} Returns `true` if `path` exists, else `false`.
*/ */
function hasPath(object, path, hasFunc) { function hasPath(object, path, hasFunc) {
if (object == null) { path = isKey(path, object) ? [path] : baseCastPath(path);
return false;
}
var result = hasFunc(object, path);
if (!result && !isKey(path)) {
path = baseCastPath(path);
var index = -1, var result,
length = path.length; index = -1,
length = path.length;
while (object != null && ++index < length) { while (++index < length) {
var key = path[index]; var key = path[index];
if (!(result = hasFunc(object, key))) { if (!(result = object != null && hasFunc(object, key))) {
break; break;
}
object = object[key];
} }
object = object[key];
} }
var length = object ? object.length : undefined; if (result) {
return result || ( return result;
!!length && isLength(length) && isIndex(path, length) && }
(isArray(object) || isString(object) || isArguments(object)) var length = object ? object.length : 0;
); return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isString(object) || isArguments(object));
} }
module.exports = hasPath; module.exports = hasPath;

View File

@@ -0,0 +1,20 @@
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
module.exports = matchesStrictComparable;

23
_toSource.js Normal file
View File

@@ -0,0 +1,23 @@
var isFunction = require('./isFunction'),
toString = require('./toString');
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to process.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (isFunction(func)) {
try {
return funcToString.call(func);
} catch (e) {}
}
return toString(func);
}
module.exports = toSource;

4
ary.js
View File

@@ -4,8 +4,8 @@ var createWrapper = require('./_createWrapper');
var ARY_FLAG = 128; var ARY_FLAG = 128;
/** /**
* Creates a function that accepts up to `n` arguments, ignoring any * Creates a function that invokes `func`, with up to `n` arguments,
* additional arguments. * ignoring any additional arguments.
* *
* @static * @static
* @memberOf _ * @memberOf _

View File

@@ -9,8 +9,7 @@ var BIND_FLAG = 1,
/** /**
* Creates a function that invokes `func` with the `this` binding of `thisArg` * Creates a function that invokes `func` with the `this` binding of `thisArg`
* and prepends any additional `_.bind` arguments to those provided to the * and `partials` prepended to the arguments it receives.
* bound function.
* *
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments. * may be used as a placeholder for partially applied arguments.

View File

@@ -9,8 +9,8 @@ var BIND_FLAG = 1,
PARTIAL_FLAG = 32; PARTIAL_FLAG = 32;
/** /**
* Creates a function that invokes the method at `object[key]` and prepends * Creates a function that invokes the method at `object[key]` with `partials`
* any additional `_.bindKey` arguments to those provided to the bound function. * prepended to the arguments it receives.
* *
* This method differs from `_.bind` by allowing bound functions to reference * This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist. See * methods that may be redefined or don't yet exist. See

View File

@@ -1,4 +1,5 @@
var baseSlice = require('./_baseSlice'), var baseSlice = require('./_baseSlice'),
isIterateeCall = require('./_isIterateeCall'),
toInteger = require('./toInteger'); toInteger = require('./toInteger');
/* Built-in method references for those with the same name as other `lodash` methods. */ /* Built-in method references for those with the same name as other `lodash` methods. */
@@ -15,7 +16,8 @@ var nativeCeil = Math.ceil,
* @since 3.0.0 * @since 3.0.0
* @category Array * @category Array
* @param {Array} array The array to process. * @param {Array} array The array to process.
* @param {number} [size=0] The length of each chunk. * @param {number} [size=1] The length of each chunk
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the new array containing chunks. * @returns {Array} Returns the new array containing chunks.
* @example * @example
* *
@@ -25,9 +27,12 @@ var nativeCeil = Math.ceil,
* _.chunk(['a', 'b', 'c', 'd'], 3); * _.chunk(['a', 'b', 'c', 'd'], 3);
* // => [['a', 'b', 'c'], ['d']] * // => [['a', 'b', 'c'], ['d']]
*/ */
function chunk(array, size) { function chunk(array, size, guard) {
size = nativeMax(toInteger(size), 0); if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
size = 1;
} else {
size = nativeMax(toInteger(size), 0);
}
var length = array ? array.length : 0; var length = array ? array.length : 0;
if (!length || size < 1) { if (!length || size < 1) {
return []; return [];

48
core.js
View File

@@ -1,6 +1,6 @@
/** /**
* @license * @license
* lodash 4.7.0 (Custom Build) <https://lodash.com/> * lodash 4.8.0 (Custom Build) <https://lodash.com/>
* Build: `lodash core -o ./dist/lodash.core.js` * Build: `lodash core -o ./dist/lodash.core.js`
* Copyright jQuery Foundation and other contributors <https://jquery.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license> * Released under MIT license <https://lodash.com/license>
@@ -13,7 +13,7 @@
var undefined; var undefined;
/** Used as the semantic version number. */ /** Used as the semantic version number. */
var VERSION = '4.7.0'; var VERSION = '4.8.0';
/** Used as the `TypeError` message for "Functions" methods. */ /** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function'; var FUNC_ERROR_TEXT = 'Expected a function';
@@ -357,7 +357,8 @@
var idCounter = 0; var idCounter = 0;
/** /**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values. * of values.
*/ */
var objectToString = objectProto.toString; var objectToString = objectProto.toString;
@@ -1140,8 +1141,8 @@
*/ */
function createCtorWrapper(Ctor) { function createCtorWrapper(Ctor) {
return function() { return function() {
// Use a `switch` statement to work with class constructors. // Use a `switch` statement to work with class constructors. See
// See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details. // for more details.
var args = arguments; var args = arguments;
var thisBinding = baseCreate(Ctor.prototype), var thisBinding = baseCreate(Ctor.prototype),
@@ -1154,9 +1155,8 @@
} }
/** /**
* Creates a function that wraps `func` to invoke it with the optional `this` * Creates a function that wraps `func` to invoke it with the `this` binding
* binding of `thisArg` and the `partials` prepended to those provided to * of `thisArg` and `partials` prepended to the arguments it receives.
* the wrapper.
* *
* @private * @private
* @param {Function} func The function to wrap. * @param {Function} func The function to wrap.
@@ -1290,7 +1290,8 @@
case regexpTag: case regexpTag:
case stringTag: case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects, // Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See https://es5.github.io/#x15.10.6.4 for more details. // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + ''); return object == (other + '');
} }
@@ -1905,7 +1906,7 @@
} }
/** /**
* Creates an array of values by running each element in `collection` through * Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments: * `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection). * (value, index|key, collection).
* *
@@ -1913,10 +1914,10 @@
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
* *
* The guarded methods are: * The guarded methods are:
* `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, * `sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`,
* and `words` * `trim`, `trimEnd`, `trimStart`, and `words`
* *
* @static * @static
* @memberOf _ * @memberOf _
@@ -1953,7 +1954,7 @@
/** /**
* Reduces `collection` to a value which is the accumulated result of running * Reduces `collection` to a value which is the accumulated result of running
* each element in `collection` through `iteratee`, where each successive * each element in `collection` thru `iteratee`, where each successive
* invocation is supplied the return value of the previous. If `accumulator` * invocation is supplied the return value of the previous. If `accumulator`
* is not given the first element of `collection` is used as the initial * is not given the first element of `collection` is used as the initial
* value. The iteratee is invoked with four arguments: * value. The iteratee is invoked with four arguments:
@@ -2064,7 +2065,7 @@
/** /**
* Creates an array of elements, sorted in ascending order by the results of * Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection through each iteratee. This method * running each element in a collection thru each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of * performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value). * equal elements. The iteratees are invoked with one argument: (value).
* *
@@ -2146,8 +2147,7 @@
/** /**
* Creates a function that invokes `func` with the `this` binding of `thisArg` * Creates a function that invokes `func` with the `this` binding of `thisArg`
* and prepends any additional `_.bind` arguments to those provided to the * and `partials` prepended to the arguments it receives.
* bound function.
* *
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments. * may be used as a placeholder for partially applied arguments.
@@ -2790,8 +2790,9 @@
} }
/** /**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * Checks if `value` is the
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* *
* @static * @static
* @memberOf _ * @memberOf _
@@ -2849,9 +2850,10 @@
/** /**
* Checks if `value` is `NaN`. * Checks if `value` is `NaN`.
* *
* **Note:** This method is not the same as * **Note:** This method is based on
* [`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
* `undefined` and other non-numeric values. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
* `undefined` and other non-number values.
* *
* @static * @static
* @memberOf _ * @memberOf _

4
core.min.js vendored
View File

@@ -1,6 +1,6 @@
/** /**
* @license * @license
* lodash 4.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * lodash 4.8.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash core -o ./dist/lodash.core.js` * Build: `lodash core -o ./dist/lodash.core.js`
*/ */
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===ln?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return yn[n]}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{ ;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===ln?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return yn[n]}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{
@@ -25,6 +25,6 @@ return x(Kn({},n))},a.mixin=an,a.negate=function(n){if(typeof n!="function")thro
if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return Q(n)?n.length?N(n):[]:cn(n)},a.values=cn,a.extend=Ln,an(a,a),a.clone=function(n){return Y(n)?Un(n)?N(n):F(n,un(n)):n},a.escape=function(n){return(n=en(n))&&hn.test(n)?n.replace(sn,i):n},a.every=function(n,t,r){return t=r?ln:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t); if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return Q(n)?n.length?N(n):[]:cn(n)},a.values=cn,a.extend=Ln,an(a,a),a.clone=function(n){return Y(n)?Un(n)?N(n):F(n,un(n)):n},a.escape=function(n){return(n=en(n))&&hn.test(n)?n.replace(sn,i):n},a.every=function(n,t,r){return t=r?ln:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t);
},a.head=G,a.identity=fn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?$n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=L,a.isArray=Un,a.isBoolean=function(n){return true===n||false===n||Z(n)&&"[object Boolean]"==Nn.call(n)},a.isDate=function(n){return Z(n)&&"[object Date]"==Nn.call(n)},a.isEmpty=function(n){if(Q(n)&&(Un(n)||tn(n)||W(n.splice)||L(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return!(qn&&un(n).length); },a.head=G,a.identity=fn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?$n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=L,a.isArray=Un,a.isBoolean=function(n){return true===n||false===n||Z(n)&&"[object Boolean]"==Nn.call(n)},a.isDate=function(n){return Z(n)&&"[object Date]"==Nn.call(n)},a.isEmpty=function(n){if(Q(n)&&(Un(n)||tn(n)||W(n.splice)||L(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return!(qn&&un(n).length);
},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Dn(n)},a.isFunction=W,a.isNaN=function(n){return nn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=nn,a.isObject=Y,a.isRegExp=function(n){return Y(n)&&"[object RegExp]"==Nn.call(n)},a.isString=tn,a.isUndefined=function(n){return n===ln},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:ln},a.max=function(n){return n&&n.length?t(n,fn,K):ln},a.min=function(n){return n&&n.length?t(n,fn,rn):ln}, },a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Dn(n)},a.isFunction=W,a.isNaN=function(n){return nn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=nn,a.isObject=Y,a.isRegExp=function(n){return Y(n)&&"[object RegExp]"==Nn.call(n)},a.isString=tn,a.isUndefined=function(n){return n===ln},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:ln},a.max=function(n){return n&&n.length?t(n,fn,K):ln},a.min=function(n){return n&&n.length?t(n,fn,rn):ln},
a.noConflict=function(){return wn._===this&&(wn._=Sn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?ln:n[t],t===ln&&(t=r),W(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=Q(n)?n:un(n),n.length)},a.some=function(n,t,r){return t=r?ln:t,S(n,m(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return b(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.7.0",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){ a.noConflict=function(){return wn._===this&&(wn._=Sn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?ln:n[t],t===ln&&(t=r),W(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=Q(n)?n:un(n),n.length)},a.some=function(n,t,r){return t=r?ln:t,S(n,m(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return b(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.8.0",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
var t=(/^(?:replace|split)$/.test(n)?String.prototype:xn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Un(u)?u:[],n)}return this[r](function(r){return t.apply(Un(r)?r:[],n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(mn||dn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){ var t=(/^(?:replace|split)$/.test(n)?String.prototype:xn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Un(u)?u:[],n)}return this[r](function(r){return t.apply(Un(r)?r:[],n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(mn||dn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
return a}):bn&&_n?(jn&&((_n.exports=a)._=a),bn._=a):wn._=a}).call(this); return a}):bn&&_n?(jn&&((_n.exports=a)._=a),bn._=a):wn._=a}).call(this);

View File

@@ -8,9 +8,9 @@ var hasOwnProperty = objectProto.hasOwnProperty;
/** /**
* Creates an object composed of keys generated from the results of running * Creates an object composed of keys generated from the results of running
* each element of `collection` through `iteratee`. The corresponding value * each element of `collection` thru `iteratee`. The corresponding value of
* of each key is the number of times the key was returned by `iteratee`. * each key is the number of times the key was returned by `iteratee`. The
* The iteratee is invoked with one argument: (value). * iteratee is invoked with one argument: (value).
* *
* @static * @static
* @memberOf _ * @memberOf _

View File

@@ -1,6 +1,9 @@
var toString = require('./toString'); var toString = require('./toString');
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ /**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source); reHasRegExpChar = RegExp(reRegExpChar.source);

View File

@@ -3,8 +3,8 @@ var baseFlatten = require('./_baseFlatten'),
/** /**
* Creates a flattened array of values by running each element in `collection` * Creates a flattened array of values by running each element in `collection`
* through `iteratee` and flattening the mapped results. The iteratee is * thru `iteratee` and flattening the mapped results. The iteratee is invoked
* invoked with three arguments: (value, index|key, collection). * with three arguments: (value, index|key, collection).
* *
* @static * @static
* @memberOf _ * @memberOf _

1
fp/__.js Normal file
View File

@@ -0,0 +1 @@
module.exports = require('./placeholder');

View File

@@ -1,14 +1,99 @@
var mapping = require('./_mapping'), var mapping = require('./_mapping'),
mutateMap = mapping.mutate, mutateMap = mapping.mutate,
fallbackHolder = {}; fallbackHolder = require('./placeholder');
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} n The arity of the new function.
* @returns {Function} Returns the new function.
*/
function baseArity(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
}
/**
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
* any additional arguments.
*
* @private
* @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function baseAry(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
}
/**
* Creates a clone of `array`.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the cloned array.
*/
function cloneArray(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
}
/**
* Creates a function that clones a given object using the assignment `func`.
*
* @private
* @param {Function} func The assignment function.
* @returns {Function} Returns the new cloner function.
*/
function createCloner(func) {
return function(object) {
return func({}, object);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} cloner The function to clone arguments.
* @returns {Function} Returns the new immutable function.
*/
function immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
}
/** /**
* The base implementation of `convert` which accepts a `util` object of methods * The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions. * required to perform conversions.
* *
* @param {Object} util The util object. * @param {Object} util The util object.
* @param {string} name The name of the function to wrap. * @param {string} name The name of the function to convert.
* @param {Function} func The function to wrap. * @param {Function} func The function to convert.
* @param {Object} [options] The options object. * @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments. * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying. * @param {boolean} [options.curry=true] Specify currying.
@@ -40,7 +125,9 @@ function baseConvert(util, name, func, options) {
'rearg': 'rearg' in options ? options.rearg : true 'rearg': 'rearg' in options ? options.rearg : true
}; };
var forceRearg = ('rearg' in options) && options.rearg, var forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder, placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined; pristine = isLib ? func.runInContext() : undefined;
@@ -73,103 +160,6 @@ function baseConvert(util, name, func, options) {
var aryMethodKeys = keys(mapping.aryMethod); var aryMethodKeys = keys(mapping.aryMethod);
var baseArity = function(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
};
var baseAry = function(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
};
var cloneArray = function(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
};
var cloneByPath = function(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
};
var convertLib = function(options) {
return _.runInContext.convert(options)();
};
var createCloner = function(func) {
return function(object) {
return func({}, object);
};
};
var immutWrap = function(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
};
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
};
var iterateeRearg = function(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
};
var overArg = function(func, iteratee, retArg) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = iteratee(args[index]);
return func.apply(undefined, args);
};
};
var wrappers = { var wrappers = {
'castArray': function(castArray) { 'castArray': function(castArray) {
return function() { return function() {
@@ -230,25 +220,143 @@ function baseConvert(util, name, func, options) {
} }
}; };
var wrap = function(name, func) { /*--------------------------------------------------------------------------*/
name = mapping.aliasToReal[name] || name;
var wrapper = wrappers[name];
var convertMethod = function(options) { /**
* Creates a clone of `object` by `path`.
*
* @private
* @param {Object} object The object to clone.
* @param {Array|string} path The path to clone by.
* @returns {Object} Returns the cloned object.
*/
function cloneByPath(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
}
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function convertLib(options) {
return _.runInContext.convert(options)(undefined);
}
/**
* Create a converter function for `func` of `name`.
*
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @returns {Function} Returns the new converter function.
*/
function createConverter(name, func) {
var oldOptions = options;
return function(options) {
var newUtil = isLib ? pristine : helpers, var newUtil = isLib ? pristine : helpers,
newFunc = isLib ? pristine[name] : func, newFunc = isLib ? pristine[name] : func,
newOptions = assign(assign({}, config), options); newOptions = assign(assign({}, oldOptions), options);
return baseConvert(newUtil, name, newFunc, newOptions); return baseConvert(newUtil, name, newFunc, newOptions);
}; };
}
/**
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
* arguments, ignoring any additional arguments.
*
* @private
* @param {Function} func The function to cap iteratee arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function iterateeAry(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
}
/**
* Creates a function that wraps `func` to invoke its iteratee with arguments
* arranged according to the specified `indexes` where the argument value at
* the first index is provided as the first argument, the argument value at
* the second index is provided as the second argument, and so on.
*
* @private
* @param {Function} func The function to rearrange iteratee arguments for.
* @param {number[]} indexes The arranged argument indexes.
* @returns {Function} Returns the new function.
*/
function iterateeRearg(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
}
/**
* Creates a function that invokes `func` with its first argument passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = transform(args[index]);
return func.apply(undefined, args);
};
}
/**
* Creates a function that wraps `func` and applys the conversions
* rules by `name`.
*
* @private
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
function wrap(name, func) {
name = mapping.aliasToReal[name] || name;
var result,
wrapped = func,
wrapper = wrappers[name];
if (wrapper) { if (wrapper) {
var result = wrapper(func); wrapped = wrapper(func);
result.convert = convertMethod;
return result;
} }
var wrapped = func; else if (config.immutable) {
if (config.immutable) {
if (mutateMap.array[name]) { if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray); wrapped = immutWrap(func, cloneArray);
} }
@@ -267,7 +375,7 @@ function baseConvert(util, name, func, options) {
spreadStart = mapping.methodSpread[name]; spreadStart = mapping.methodSpread[name];
result = wrapped; result = wrapped;
if (config.fixed) { if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined result = spreadStart === undefined
? ary(result, aryKey) ? ary(result, aryKey)
: spread(result, spreadStart); : spread(result, spreadStart);
@@ -282,7 +390,8 @@ function baseConvert(util, name, func, options) {
result = iterateeAry(result, aryN); result = iterateeAry(result, aryN);
} }
} }
if (config.curry && aryKey > 1) { if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(result, aryKey); result = curry(result, aryKey);
} }
return false; return false;
@@ -293,24 +402,26 @@ function baseConvert(util, name, func, options) {
result || (result = wrapped); result || (result = wrapped);
if (result == func) { if (result == func) {
result = function() { result = forceCurry ? curry(result, 1) : function() {
return func.apply(this, arguments); return func.apply(this, arguments);
}; };
} }
result.convert = convertMethod; result.convert = createConverter(name, func);
if (mapping.placeholder[name]) { if (mapping.placeholder[name]) {
setPlaceholder = true; setPlaceholder = true;
result.placeholder = func.placeholder = placeholder; result.placeholder = func.placeholder = placeholder;
} }
return result; return result;
}; }
/*--------------------------------------------------------------------------*/
if (!isObj) { if (!isObj) {
return wrap(name, func); return wrap(name, func);
} }
var _ = func; var _ = func;
// Iterate over methods for the current ary cap. // Convert methods by ary cap.
var pairs = []; var pairs = [];
each(aryMethodKeys, function(aryKey) { each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) { each(mapping.aryMethod[aryKey], function(key) {
@@ -321,6 +432,21 @@ function baseConvert(util, name, func, options) {
}); });
}); });
// Convert remaining methods.
each(keys(_), function(key) {
var func = _[key];
if (typeof func == 'function') {
var length = pairs.length;
while (length--) {
if (pairs[length][0] == key) {
return;
}
}
func.convert = createConverter(key, func);
pairs.push([key, func]);
}
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining. // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) { each(pairs, function(pair) {
_[pair[0]] = pair[1]; _[pair[0]] = pair[1];
@@ -330,7 +456,7 @@ function baseConvert(util, name, func, options) {
if (setPlaceholder) { if (setPlaceholder) {
_.placeholder = placeholder; _.placeholder = placeholder;
} }
// Reassign aliases. // Assign aliases.
each(keys(_), function(key) { each(keys(_), function(key) {
each(mapping.realToAlias[key] || [], function(alias) { each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key]; _[alias] = _[key];

View File

@@ -1,9 +1,10 @@
var baseConvert = require('./_baseConvert'); var baseConvert = require('./_baseConvert');
/** /**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last version. * Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
* *
* @param {Function} lodash The lodash function. * @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details. * @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`. * @returns {Function} Returns the converted `lodash`.
*/ */

7
fp/_falseOptions.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = {
'cap': false,
'curry': false,
'fixed': false,
'immutable': false,
'rearg': false
});

View File

@@ -52,9 +52,10 @@ exports.aliasToReal = {
exports.aryMethod = { exports.aryMethod = {
'1': [ '1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words' 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
], ],
'2': [ '2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
@@ -164,6 +165,10 @@ exports.methodRearg = {
exports.methodSpread = { exports.methodSpread = {
'invokeArgs': 2, 'invokeArgs': 2,
'invokeArgsMap': 2, 'invokeArgsMap': 2,
'over': 0,
'overArgs': 1,
'overEvery': 0,
'overSome': 0,
'partial': 1, 'partial': 1,
'partialRight': 1, 'partialRight': 1,
'without': 1 'without': 1
@@ -244,7 +249,17 @@ exports.remap = {
'trimCharsStart': 'trimStart' 'trimCharsStart': 'trimStart'
}; };
/** Used to track methods that skip `_.rearg`. */ /** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = { exports.skipRearg = {
'add': true, 'add': true,
'assign': true, 'assign': true,
@@ -263,6 +278,7 @@ exports.skipRearg = {
'matchesProperty': true, 'matchesProperty': true,
'merge': true, 'merge': true,
'multiply': true, 'multiply': true,
'overArgs': true,
'partial': true, 'partial': true,
'partialRight': true, 'partialRight': true,
'random': true, 'random': true,

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('add', require('../add')); func = convert('add', require('../add'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('after', require('../after')); func = convert('after', require('../after'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('ary', require('../ary')); func = convert('ary', require('../ary'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('assign', require('../assign')); func = convert('assign', require('../assign'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('assignIn', require('../assignIn')); func = convert('assignIn', require('../assignIn'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('assignInWith', require('../assignInWith')); func = convert('assignInWith', require('../assignInWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('assignWith', require('../assignWith')); func = convert('assignWith', require('../assignWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('at', require('../at')); func = convert('at', require('../at'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('attempt', require('../attempt')); func = convert('attempt', require('../attempt'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('before', require('../before')); func = convert('before', require('../before'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('bind', require('../bind')); func = convert('bind', require('../bind'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('bindAll', require('../bindAll')); func = convert('bindAll', require('../bindAll'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('bindKey', require('../bindKey')); func = convert('bindKey', require('../bindKey'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../camelCase'); var convert = require('./convert'),
func = convert('camelCase', require('../camelCase'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../capitalize'); var convert = require('./convert'),
func = convert('capitalize', require('../capitalize'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('castArray', require('../castArray')); func = convert('castArray', require('../castArray'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('ceil', require('../ceil')); func = convert('ceil', require('../ceil'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../chain'); var convert = require('./convert'),
func = convert('chain', require('../chain'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('chunk', require('../chunk')); func = convert('chunk', require('../chunk'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('clamp', require('../clamp')); func = convert('clamp', require('../clamp'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../clone'); var convert = require('./convert'),
func = convert('clone', require('../clone'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../cloneDeep'); var convert = require('./convert'),
func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('cloneDeepWith', require('../cloneDeepWith')); func = convert('cloneDeepWith', require('../cloneDeepWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('cloneWith', require('../cloneWith')); func = convert('cloneWith', require('../cloneWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../commit'); var convert = require('./convert'),
func = convert('commit', require('../commit'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../compact'); var convert = require('./convert'),
func = convert('compact', require('../compact'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('concat', require('../concat')); func = convert('concat', require('../concat'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../cond'); var convert = require('./convert'),
func = convert('cond', require('../cond'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../conforms'); var convert = require('./convert'),
func = convert('conforms', require('../conforms'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../constant'); var convert = require('./convert'),
func = convert('constant', require('../constant'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -3,7 +3,8 @@ var baseConvert = require('./_baseConvert'),
/** /**
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
* version. If `name` is an object its methods will be converted. * version with conversion `options` applied. If `name` is an object its methods
* will be converted.
* *
* @param {string} name The name of the function to wrap. * @param {string} name The name of the function to wrap.
* @param {Function} [func] The function to wrap. * @param {Function} [func] The function to wrap.

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('countBy', require('../countBy')); func = convert('countBy', require('../countBy'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('create', require('../create')); func = convert('create', require('../create'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('curry', require('../curry')); func = convert('curry', require('../curry'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('curryN', require('../curry')); func = convert('curryN', require('../curry'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('curryRight', require('../curryRight')); func = convert('curryRight', require('../curryRight'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('curryRightN', require('../curryRight')); func = convert('curryRightN', require('../curryRight'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('debounce', require('../debounce')); func = convert('debounce', require('../debounce'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../deburr'); var convert = require('./convert'),
func = convert('deburr', require('../deburr'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('defaults', require('../defaults')); func = convert('defaults', require('../defaults'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('defaultsDeep', require('../defaultsDeep')); func = convert('defaultsDeep', require('../defaultsDeep'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../defer'); var convert = require('./convert'),
func = convert('defer', require('../defer'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('delay', require('../delay')); func = convert('delay', require('../delay'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('difference', require('../difference')); func = convert('difference', require('../difference'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('differenceBy', require('../differenceBy')); func = convert('differenceBy', require('../differenceBy'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('differenceWith', require('../differenceWith')); func = convert('differenceWith', require('../differenceWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('divide', require('../divide')); func = convert('divide', require('../divide'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('drop', require('../drop')); func = convert('drop', require('../drop'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('dropRight', require('../dropRight')); func = convert('dropRight', require('../dropRight'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('dropRightWhile', require('../dropRightWhile')); func = convert('dropRightWhile', require('../dropRightWhile'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('dropWhile', require('../dropWhile')); func = convert('dropWhile', require('../dropWhile'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('endsWith', require('../endsWith')); func = convert('endsWith', require('../endsWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('eq', require('../eq')); func = convert('eq', require('../eq'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../escape'); var convert = require('./convert'),
func = convert('escape', require('../escape'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../escapeRegExp'); var convert = require('./convert'),
func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('every', require('../every')); func = convert('every', require('../every'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('fill', require('../fill')); func = convert('fill', require('../fill'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('filter', require('../filter')); func = convert('filter', require('../filter'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('find', require('../find')); func = convert('find', require('../find'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('findIndex', require('../findIndex')); func = convert('findIndex', require('../findIndex'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('findKey', require('../findKey')); func = convert('findKey', require('../findKey'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('findLast', require('../findLast')); func = convert('findLast', require('../findLast'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('findLastIndex', require('../findLastIndex')); func = convert('findLastIndex', require('../findLastIndex'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('findLastKey', require('../findLastKey')); func = convert('findLastKey', require('../findLastKey'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('flatMap', require('../flatMap')); func = convert('flatMap', require('../flatMap'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('flatMapDeep', require('../flatMapDeep')); func = convert('flatMapDeep', require('../flatMapDeep'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('flatMapDepth', require('../flatMapDepth')); func = convert('flatMapDepth', require('../flatMapDepth'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../flatten'); var convert = require('./convert'),
func = convert('flatten', require('../flatten'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../flattenDeep'); var convert = require('./convert'),
func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('flattenDepth', require('../flattenDepth')); func = convert('flattenDepth', require('../flattenDepth'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../flip'); var convert = require('./convert'),
func = convert('flip', require('../flip'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1,2 +1,5 @@
var convert = require('./convert'); var convert = require('./convert'),
module.exports = convert('floor', require('../floor')); func = convert('floor', require('../floor'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../flow'); var convert = require('./convert'),
func = convert('flow', require('../flow'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -1 +1,5 @@
module.exports = require('../flowRight'); var convert = require('./convert'),
func = convert('flowRight', require('../flowRight'));
func.placeholder = require('./placeholder');
module.exports = func;

Some files were not shown because too many files have changed in this diff Show More