diff --git a/.markdown-doctest-setup.js b/.markdown-doctest-setup.js index fc16ea65ec..cdb0bbb5c7 100644 --- a/.markdown-doctest-setup.js +++ b/.markdown-doctest-setup.js @@ -2,8 +2,8 @@ delete global['__core-js_shared__']; -var _ = require('./lodash.js'), - globals = require('lodash-doc-globals'); +const _ = require('./lodash.js'); +const globals = require('lodash-doc-globals'); module.exports = { 'babel': false, diff --git a/.travis.yml b/.travis.yml index a22462c998..549d823a2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,14 +18,8 @@ env: - SAUCE_LABS=true matrix: include: - - node_js: "0.10" - env: - - node_js: "0.12" - env: - node_js: "4" env: - - node_js: "5" - env: git: depth: 10 branches: @@ -56,15 +50,14 @@ before_install: # Remove code skipped on the coverage run. - | - PATTERN[0]="|\s*if\s*\(isHostObject\b[\s\S]+?\}(?=\n)|" - PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|" - PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|" - PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|" - PATTERN[4]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g" - PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|" - PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|" - PATTERN[7]="|\s*define\([\s\S]+?\);|" - PATTERN[8]="|\s*root\._\s*=\s*_;|" + PATTERN[0]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|" + PATTERN[1]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|" + PATTERN[2]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|" + PATTERN[3]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g" + PATTERN[4]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|" + PATTERN[5]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|" + PATTERN[6]="|\s*define\([\s\S]+?\);|" + PATTERN[7]="|\s*root\._\s*=\s*_;|" if [ $ISTANBUL == true ]; then set -e diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000000..7c0f1e3ee1 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1 @@ +https://github.com/lodash/lodash/wiki/Changelog diff --git a/README.md b/README.md index d6159df3ef..93445ff7e7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.15.0 +# lodash v4.16.0 [Site](https://lodash.com/) | [Docs](https://lodash.com/docs) | @@ -12,7 +12,7 @@ The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): -```bash +```shell $ npm run build $ lodash -o ./dist/lodash.js $ lodash core -o ./dist/lodash.core.js @@ -20,12 +20,46 @@ $ lodash core -o ./dist/lodash.core.js ## Download -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.15.0/LICENSE) & supports [modern environments](#support).
+ * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.16.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.16.0/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.16.0/dist/lodash.js) ([~23 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.16.0/dist/lodash.min.js)) + * [CDN copies](https://www.jsdelivr.com/projects/lodash) + +Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.16.0/LICENSE) & supports [modern environments](#support).
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. - * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.js) ([~23 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.min.js)) - * [CDN copies](https://www.jsdelivr.com/projects/lodash) +## Installation + +In a browser: +```html + +``` + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var chunk = require('lodash/chunk'); +var extend = require('lodash/fp/extend'); +``` + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. ## Why Lodash? diff --git a/dist/lodash.core.js b/dist/lodash.core.js index de27977d22..7b2496722f 100644 --- a/dist/lodash.core.js +++ b/dist/lodash.core.js @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.15.0'; + var VERSION = '4.16.0'; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -53,8 +53,7 @@ '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' + "'": ''' }; /** Detect free variable `global` from Node.js. */ @@ -183,17 +182,6 @@ */ var escapeHtmlChar = basePropertyOf(htmlEscapes); - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject() { - return false; - } - /** * Creates a unary function that invokes `func` with its argument transformed. * @@ -414,10 +402,23 @@ var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + /** * The base implementation of `_.create` without support for assigning * properties to the created object. @@ -674,8 +675,8 @@ othTag = objectToString.call(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; stack || (stack = []); @@ -832,24 +833,7 @@ * @returns {Function} Returns the new function. */ function baseRest(func, start) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return func.apply(this, otherArgs); - }; + return setToString(overRest(func, start, identity), func + ''); } /** @@ -979,6 +963,7 @@ * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -991,7 +976,14 @@ ? customizer(object[key], source[key], key, object, source) : undefined; - assignValue(object, key, newValue === undefined ? source[key] : newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } @@ -1326,6 +1318,17 @@ return result; } + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + /** * Checks if `value` is a flattenable `arguments` object or array. * @@ -1356,6 +1359,46 @@ return result; } + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + /** * Converts `value` to a string key if it's not a string or symbol. * @@ -1409,17 +1452,18 @@ * // => [1] */ function concat() { - var length = arguments.length, - args = Array(length ? length - 1 : 0), + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), array = arguments[0], index = length; while (index--) { args[index - 1] = arguments[index]; } - return length - ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)) - : []; + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** @@ -1905,7 +1949,7 @@ * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -2099,16 +2143,11 @@ * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function sortBy(collection, iteratee) { var index = 0; @@ -2212,7 +2251,7 @@ * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); @@ -2698,7 +2737,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -2726,7 +2765,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** @@ -3263,8 +3302,8 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = baseRest(function(object, props) { - return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey)); + var pick = flatRest(function(object, props) { + return object == null ? {} : basePick(object, baseMap(props, toKey)); }); /** @@ -3337,8 +3376,8 @@ /*------------------------------------------------------------------------*/ /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -3349,12 +3388,6 @@ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. diff --git a/dist/lodash.core.min.js b/dist/lodash.core.min.js index f5c9efaeee..2182f73d33 100644 --- a/dist/lodash.core.min.js +++ b/dist/lodash.core.min.js @@ -3,26 +3,26 @@ * lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash core -o ./dist/lodash.core.js` */ -;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n){return function(t){return null==t?Z:t[n]}}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return d(t,function(t){return n[t]})}function u(n){return n instanceof o?n:new o(n)}function o(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function i(n,t,r,e){return n===Z||J(n,an[r])&&!ln.call(e,r)?t:n}function c(n){return V(n)?vn(n):{}}function f(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); -return setTimeout(function(){n.apply(Z,r)},t)}function a(n,t){var r=true;return jn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(n,t,r){for(var e=-1,u=n.length;++et}function y(n,t,r,e,u){return n===t||(null==n||null==t||!V(n)&&!H(t)?n!==n&&t!==t:g(n,t,y,r,e,u))}function g(n,t,r,e,u,o){var i=wn(n),c=wn(t),f="[object Array]",a="[object Array]";i||(f=sn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=sn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=On(o,function(t){return t[0]==n; -}),s=On(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 2&u||(i=l&&ln.call(n,"__wrapped__"),f=c&&ln.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n, -f=f?t.value():t,r=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?m:t)(n)}function j(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=1&u?[]:Z;++cr?_n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,jn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=kn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){ -return H(n)&&P(n)&&ln.call(n,"callee")&&(!bn.call(n,"callee")||"[object Arguments]"==sn.call(n))}function P(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return n=V(n)?sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function V(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function H(n){return!!n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==sn.call(n)} -function L(n){return typeof n=="string"||!wn(n)&&H(n)&&"[object String]"==sn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return n?e(n,Rn(n)):[]}function X(n){return n}function Y(t,r,e){var u=Rn(r),o=v(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=v(r,Rn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(t);return jn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({ -func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var Z,nn=1/0,tn=/[&<>"'`]/g,rn=RegExp(tn.source),en=typeof self=="object"&&self&&self.Object===Object&&self,un=typeof global=="object"&&global&&global.Object===Object&&global||en||Function("return this")(),on=(en=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,cn=function(n){return function(t){return null==n?Z:n[t]}}({"&":"&", -"<":"<",">":">",'"':""","'":"'","`":"`"}),fn=Array.prototype,an=Object.prototype,ln=an.hasOwnProperty,pn=0,sn=an.toString,hn=un._,vn=Object.create,bn=an.propertyIsEnumerable,yn=un.isFinite,gn=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),_n=Math.max;o.prototype=c(u.prototype),o.prototype.constructor=o;var jn=function(n,t){return function(r,e){if(null==r)return r;if(!P(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=_n(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&rt}function y(n,t,r,e,u){return n===t||(null==n||null==t||!K(n)&&!L(t)?n!==n&&t!==t:g(n,t,y,r,e,u))}function g(n,t,r,e,u,o){var i=Sn(n),c=Sn(t),f="[object Array]",a="[object Array]";i||(f=vn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=vn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=En(o,function(t){return t[0]==n}),s=En(o,function(n){ +return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=P(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 2&u||(i=l&&sn.call(n,"__wrapped__"),f=c&&sn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, +r=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Z:(typeof n=="object"?m:t)(n)}function j(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=1&u?[]:tn;++cr?dn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function M(n,t){ +var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Tn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=tn),r}}function P(n,t){return n===t||n!==n&&t!==t}function U(n){return L(n)&&V(n)&&sn.call(n,"callee")&&(!gn.call(n,"callee")||"[object Arguments]"==vn.call(n))}function V(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!H(n)}function H(n){return n=K(n)?vn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n; +}function K(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function L(n){return null!=n&&typeof n=="object"}function Q(n){return typeof n=="number"||L(n)&&"[object Number]"==vn.call(n)}function W(n){return typeof n=="string"||!Sn(n)&&L(n)&&"[object String]"==vn.call(n)}function X(n){return typeof n=="string"?n:null==n?"":n+""}function Y(n){return n?e(n,qn(n)):[]}function Z(n){return n}function nn(t,r,e){var u=qn(r),o=v(r,u);null!=e||K(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=v(r,qn(r))); +var i=!(K(e)&&"chain"in e&&!e.chain),c=H(t);return mn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var tn,rn=1/0,en=/[&<>"'`]/g,un=RegExp(en.source),on=typeof self=="object"&&self&&self.Object===Object&&self,cn=typeof global=="object"&&global&&global.Object===Object&&global||on||Function("return this")(),fn=(on=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,an=function(n){ +return function(t){return null==n?tn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),ln=Array.prototype,pn=Object.prototype,sn=pn.hasOwnProperty,hn=0,vn=pn.toString,bn=cn._,yn=Object.create,gn=pn.propertyIsEnumerable,_n=cn.isFinite,jn=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),dn=Math.max;o.prototype=c(u.prototype),o.prototype.constructor=o;var mn=function(n,t){return function(r,e){if(null==r)return r;if(!V(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=dn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){ +r=1;break n}if(!o&&r1?q(e,r):e}function g(t,e,r){if(B.fixed&&(F||!u.skipFixed[t])){var n=u.methodSpread[t],i=n&&n.start;return void 0===i?M(e,r):N(e,i)}return e}function y(t,e,r){return B.rearg&&r>1&&(j||!u.skipRearg[t])?_(e,u.methodRearg[t]||u.aryRearg[r]):e}function m(t,e){e=U(e);for(var r=-1,n=e.length,i=n-1,a=z(Object(t)),o=a;null!=o&&++r2?r-2:1,a&&a<=r?n:i(n,r)):n}}, -mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return P(K(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),P(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]]}),r}},nthArg:function(t){return function(e){var r=e<0?1:V(e)+1;return q(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return q(t(e,r),n)}},runInContext:function(e){return function(r){return l(t,e(r),d)}}};if(!k)return R(e,r);var J=r,Q=[]; -return P(G,function(t){P(u.aryMethod[t],function(t){var e=J[u.remap[t]||t];e&&Q.push([t,R(t,e)])})}),P(K(J),function(t){var e=J[t];if("function"==typeof e){for(var r=Q.length;r--;)if(Q[r][0]==t)return;e.convert=A(t,e),Q.push([t,e])}}),P(Q,function(t){J[t[0]]=t[1]}),J.convert=v,O&&(J.placeholder=L),P(K(J),function(t){P(u.realToAlias[t]||[],function(e){J[e]=J[t]})}),J}var u=r(2),p=u.mutate,f=r(3);t.exports=l},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn", +i}}}function l(t,e,r,d){function c(t,e){if(B.cap){var r=u.iterateeRearg[t];if(r)return x(e,r);var n=!b&&u.iterateeAry[t];if(n)return W(e,n)}return e}function h(t,e,r){return E||B.curry&&r>1?z(e,r):e}function g(t,e,r){if(B.fixed&&(F||!u.skipFixed[t])){var n=u.methodSpread[t],i=n&&n.start;return void 0===i?w(e,r):N(e,i)}return e}function y(t,e,r){return B.rearg&&r>1&&(j||!u.skipRearg[t])?_(e,u.methodRearg[t]||u.aryRearg[r]):e}function m(t,e){e=U(e);for(var r=-1,n=e.length,i=n-1,a=D(Object(t)),o=a;null!=o&&++r2?r-2:1,a&&a<=r?n:i(n,r)):n}}, +mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return q(K(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),q(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]]}),r}},nthArg:function(t){return function(e){var r=e<0?1:V(e)+1;return z(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return z(t(e,r),n)}},runInContext:function(e){return function(r){return l(t,e(r),d)}}};if(!k)return R(e,r);var J=r,Q=[]; +return q(G,function(t){q(u.aryMethod[t],function(t){var e=J[u.remap[t]||t];e&&Q.push([t,R(t,e)])})}),q(K(J),function(t){var e=J[t];if("function"==typeof e){for(var r=Q.length;r--;)if(Q[r][0]==t)return;e.convert=A(t,e),Q.push([t,e])}}),q(Q,function(t){J[t[0]]=t[1]}),J.convert=v,O&&(J.placeholder=L),q(K(J),function(t){q(u.realToAlias[t]||[],function(e){J[e]=J[t]})}),J}var u=r(2),p=u.mutate,f=r(3);t.exports=l},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn", extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq", indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"}, e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"], -3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"], +3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"], 4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1, -transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInAllWith:[1,2,0],assignInWith:[1,2,0],assignAllWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,2,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0], -unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{afterRearg:!0,start:1},assignInAll:{start:0},assignInAllWith:{afterRearg:!0,start:1},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{afterRearg:!0,start:1},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0, -pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={}; +transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInAllWith:[1,2,0],assignInWith:[1,2,0],assignAllWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,2,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0], +sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{afterRearg:!0,start:1},assignInAll:{start:0},assignInAllWith:{afterRearg:!0,start:1},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{afterRearg:!0,start:1},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{ +fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={}; for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf", -mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0, -overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])}); \ No newline at end of file +mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0, +lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])}); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index 6b25256304..100e388395 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.15.0'; + var VERSION = '4.16.0'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -23,6 +23,9 @@ /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; @@ -47,7 +50,7 @@ DEFAULT_TRUNC_OMISSION = '...'; /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 150, + var HOT_COUNT = 500, HOT_SPAN = 16; /** Used to indicate the type of lazy iteratees. */ @@ -164,9 +167,6 @@ /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; - /** Used to detect hexadecimal string values. */ - var reHasHexPrefix = /^0x/i; - /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; @@ -361,7 +361,7 @@ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', '\u0132': 'IJ', '\u0133': 'ij', '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 'ss' + '\u0149': "'n", '\u017f': 's' }; /** Used to map characters to HTML entities. */ @@ -370,8 +370,7 @@ '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' + "'": ''' }; /** Used to map HTML entities to characters. */ @@ -380,8 +379,7 @@ '<': '<', '>': '>', '"': '"', - ''': "'", - '`': '`' + ''': "'" }; /** Used to escape characters for inclusion in compiled string literals. */ @@ -822,18 +820,9 @@ * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return baseFindIndex(array, baseIsNaN, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); } /** @@ -1038,7 +1027,7 @@ } /** - * Checks if a cache value for `key` exists. + * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. @@ -1096,7 +1085,7 @@ while (length--) { if (array[length] === placeholder) { - result++; + ++result; } } return result; @@ -1166,25 +1155,6 @@ return reHasUnicodeWord.test(string); } - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; - } - /** * Converts `iterator` to an array. * @@ -1292,6 +1262,48 @@ return result; } + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + /** * Gets the number of symbols in `string`. * @@ -1337,7 +1349,7 @@ function unicodeSize(string) { var result = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { - result++; + ++result; } return result; } @@ -1392,13 +1404,6 @@ * lodash.isFunction(lodash.bar); * // => true * - * // Use `context` to stub `Date#getTime` use in `_.now`. - * var stubbed = _.runInContext({ - * 'Date': function() { - * return { 'getTime': stubGetTime }; - * } - * }); - * * // Create a suped-up `defer` in Node.js. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; */ @@ -1462,6 +1467,7 @@ var Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, + defineProperty = Object.defineProperty, getPrototype = overArg(Object.getPrototypeOf, Object), iteratorSymbol = Symbol ? Symbol.iterator : undefined, objectCreate = Object.create, @@ -1484,6 +1490,7 @@ nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max, nativeMin = Math.min, + nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse; @@ -1494,22 +1501,12 @@ Promise = getNative(context, 'Promise'), Set = getNative(context, 'Set'), WeakMap = getNative(context, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - - /* Used to set `toString` methods. */ - var defineProperty = (function() { - var func = getNative(Object, 'defineProperty'), - name = getNative.name; - - return (name && name.length > 2) ? func : undefined; - }()); + nativeCreate = getNative(Object, 'create'), + nativeDefineProperty = getNative(Object, 'defineProperty'); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; - /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ - var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** Used to lookup unminified function names. */ var realNames = {}; @@ -1897,6 +1894,7 @@ */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; } /** @@ -1910,7 +1908,9 @@ * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } /** @@ -1957,6 +1957,7 @@ */ function hashSet(key, value) { var data = this.__data__; + this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } @@ -1997,6 +1998,7 @@ */ function listCacheClear() { this.__data__ = []; + this.size = 0; } /** @@ -2021,6 +2023,7 @@ } else { splice.call(data, index, 1); } + --this.size; return true; } @@ -2068,6 +2071,7 @@ index = assocIndexOf(data, key); if (index < 0) { + ++this.size; data.push([key, value]); } else { data[index][1] = value; @@ -2110,6 +2114,7 @@ * @memberOf MapCache */ function mapCacheClear() { + this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), @@ -2127,7 +2132,9 @@ * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; } /** @@ -2167,7 +2174,11 @@ * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; return this; } @@ -2240,7 +2251,8 @@ * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { - this.__data__ = new ListCache(entries); + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } /** @@ -2252,6 +2264,7 @@ */ function stackClear() { this.__data__ = new ListCache; + this.size = 0; } /** @@ -2264,7 +2277,11 @@ * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { - return this.__data__['delete'](key); + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; } /** @@ -2304,16 +2321,18 @@ * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); + this.size = ++data.size; return this; } - cache = this.__data__ = new MapCache(pairs); + data = this.__data__ = new MapCache(pairs); } - cache.set(key, value); + data.set(key, value); + this.size = data.size; return this; } @@ -2353,6 +2372,44 @@ return result; } + /** + * A specialized version of `_.sample` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + var result = arrayShuffle(array); + result.length = baseClamp(n, 0, result.length); + return result; + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + /** * Used by `_.defaults` to customize its `_.assignIn` use. * @@ -2383,7 +2440,7 @@ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } @@ -2401,7 +2458,7 @@ var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } @@ -2454,6 +2511,28 @@ return object && copyObject(source, keys(source), object); } + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + /** * The base implementation of `_.at` without support for individual paths. * @@ -2534,9 +2613,6 @@ return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } result = initCloneObject(isFunc ? {} : value); if (!isDeep) { return copySymbols(value, baseAssign(result, value)); @@ -3180,8 +3256,8 @@ othTag = getTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && !objIsObj) { @@ -3286,7 +3362,7 @@ if (!isObject(value) || isMasked(value)) { return false; } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } @@ -3644,7 +3720,7 @@ value = object[key]; if (predicate(value, key)) { - result[key] = value; + baseAssignValue(result, key, value); } } return result; @@ -3810,24 +3886,7 @@ * @returns {Function} Returns the new function. */ function baseRest(func, start) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + return setToString(overRest(func, start, identity), func + ''); } /** @@ -3871,7 +3930,7 @@ } /** - * The base implementation of `setData` without support for hot loop detection. + * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. @@ -3883,6 +3942,23 @@ return func; }; + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !nativeDefineProperty ? identity : function(func, string) { + return nativeDefineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + /** * The base implementation of `_.slice` without an iteratee call guard. * @@ -4297,6 +4373,17 @@ return isArray(value) ? value : stringToPath(value); } + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + /** * Casts `array` to a slice if it's needed. * @@ -4611,6 +4698,7 @@ * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -4623,7 +4711,14 @@ ? customizer(object[key], source[key], key, object, source) : undefined; - assignValue(object, key, newValue === undefined ? source[key] : newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } @@ -4902,9 +4997,7 @@ * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return baseRest(function(funcs) { - funcs = baseFlatten(funcs, 1); - + return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; @@ -5087,11 +5180,8 @@ * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { - return baseRest(function(iteratees) { - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? arrayMap(iteratees[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(iteratees, 1), baseUnary(getIteratee())); - + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { @@ -5434,9 +5524,9 @@ // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { - if (!seen.has(othIndex) && + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { - return seen.add(othIndex); + return seen.push(othIndex); } })) { result = false; @@ -5616,6 +5706,17 @@ return result; } + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + /** * Creates an array of own enumerable property names and symbols of `object`. * @@ -5784,8 +5885,7 @@ */ var getTag = baseGetTag; - // Fallback for data views, maps, sets, and weak maps in IE 11, - // for data views in Edge < 14, and promises in Node.js. + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || @@ -5861,9 +5961,9 @@ function hasPath(object, path, hasFunc) { path = isKey(path, object) ? [path] : castPath(path); - var result, - index = -1, - length = path.length; + var index = -1, + length = path.length, + result = false; while (++index < length) { var key = toKey(path[index]); @@ -5872,10 +5972,10 @@ } object = object[key]; } - if (result) { + if (result || ++index != length) { return result; } - var length = object ? object.length : 0; + length = object ? object.length : 0; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } @@ -5970,9 +6070,11 @@ * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { - var length = details.length, - lastIndex = length - 1; - + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); @@ -6151,6 +6253,26 @@ }; } + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + /** * Merges the function metadata of `source` into `data`. * @@ -6264,6 +6386,36 @@ return result; } + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + /** * Gets the parent value at `path` of `object`. * @@ -6312,25 +6464,7 @@ * @param {*} data The metadata. * @returns {Function} Returns `func`. */ - var setData = (function() { - var count = 0, - lastCalled = 0; - - return function(key, value) { - var stamp = now(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return key; - } - } else { - count = 0; - } - return baseSetData(key, value); - }; - }()); + var setData = shortOut(baseSetData); /** * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). @@ -6344,6 +6478,16 @@ return root.setTimeout(func, wait); }; + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. @@ -6354,14 +6498,61 @@ * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ - var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) { + function setWrapToString(wrapper, reference, bitmask) { var source = (reference + ''); - return defineProperty(wrapper, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))) - }); - }; + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `arrayShuffle` which mutates `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + while (++index < length) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + return array; + } /** * Converts `string` to a property path array. @@ -6370,7 +6561,7 @@ * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ - var stringToPath = memoize(function(string) { + var stringToPath = memoizeCapped(function(string) { string = toString(string); var result = []; @@ -6549,24 +6740,25 @@ * // => [1] */ function concat() { - var length = arguments.length, - args = Array(length ? length - 1 : 0), + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), array = arguments[0], index = length; while (index--) { args[index - 1] = arguments[index]; } - return length - ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)) - : []; + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** * Creates an array of `array` values not included in the other given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * for equality comparisons. The order and references of result values are + * determined by the first array. * * **Note:** Unlike `_.pullAll`, this method returns a new array. * @@ -6592,8 +6784,9 @@ /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * @@ -6626,9 +6819,9 @@ /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. Result values - * are chosen from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). * * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * @@ -7122,8 +7315,8 @@ /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ @@ -7146,8 +7339,9 @@ /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ @@ -7181,9 +7375,9 @@ /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. Result values are chosen - * from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -7281,21 +7475,11 @@ var index = length; if (fromIndex !== undefined) { index = toInteger(fromIndex); - index = ( - index < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1) - ) + 1; - } - if (value !== value) { - return baseFindIndex(array, baseIsNaN, index - 1, true); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } /** @@ -7457,9 +7641,7 @@ * console.log(pulled); * // => ['b', 'd'] */ - var pullAt = baseRest(function(array, indexes) { - indexes = baseFlatten(indexes, 1); - + var pullAt = flatRest(function(array, indexes) { var length = array ? array.length : 0, result = baseAt(array, indexes); @@ -8034,8 +8216,9 @@ /** * Creates a duplicate-free version of an array, using * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ @@ -8057,7 +8240,9 @@ /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ @@ -8084,8 +8269,9 @@ /** * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -8227,8 +8413,9 @@ /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The iteratee is invoked with one argument: - * (value). + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * * @static * @memberOf _ @@ -8257,8 +8444,9 @@ /** * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -8475,8 +8663,7 @@ * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] */ - var wrapperAt = baseRest(function(paths) { - paths = baseFlatten(paths, 1); + var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, @@ -8741,7 +8928,11 @@ * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } }); /** @@ -8996,7 +9187,7 @@ * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -9064,7 +9255,7 @@ if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { - result[key] = [value]; + baseAssignValue(result, key, [value]); } }); @@ -9177,7 +9368,7 @@ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { - result[key] = value; + baseAssignValue(result, key, value); }); /** @@ -9437,10 +9628,7 @@ * // => 2 */ function sample(collection) { - var array = isArrayLike(collection) ? collection : values(collection), - length = array.length; - - return length > 0 ? array[baseRandom(0, length - 1)] : undefined; + return arraySample(isArrayLike(collection) ? collection : values(collection)); } /** @@ -9464,25 +9652,12 @@ * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { - n = baseClamp(toInteger(n), 0, length); - } - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; + n = toInteger(n); } - result.length = n; - return result; + return arraySampleSize(isArrayLike(collection) ? collection : values(collection), n); } /** @@ -9501,7 +9676,10 @@ * // => [4, 1, 3, 2] */ function shuffle(collection) { - return sampleSize(collection, MAX_ARRAY_LENGTH); + return shuffleSelf(isArrayLike(collection) + ? copyArray(collection) + : values(collection) + ); } /** @@ -9606,16 +9784,11 @@ * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { @@ -10130,7 +10303,7 @@ * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); @@ -10238,14 +10411,14 @@ return cache.get(key); } var result = func.apply(this, args); - memoized.cache = cache.set(key, result); + memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } - // Assign cache to `_.memoize`. + // Expose `MapCache`. memoize.Cache = MapCache; /** @@ -10337,7 +10510,7 @@ * func(10, 5); * // => [100, 10] */ - var overArgs = baseRest(function(func, transforms) { + var overArgs = castRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); @@ -10451,8 +10624,8 @@ * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ - var rearg = baseRest(function(func, indexes) { - return createWrap(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); + var rearg = flatRest(function(func, indexes) { + return createWrap(func, REARG_FLAG, undefined, undefined, undefined, indexes); }); /** @@ -11128,7 +11301,7 @@ * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + return value != null && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); } /** @@ -11174,7 +11347,7 @@ if (tag == mapTag || tag == setTag) { return !value.size; } - if (nonEnumShadows || isPrototype(value)) { + if (isPrototype(value)) { return !nativeKeys(value).length; } for (var key in value) { @@ -11423,7 +11596,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -11451,7 +11624,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** @@ -11715,8 +11888,7 @@ * // => true */ function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { + if (!isObjectLike(value) || objectToString.call(value) != objectTag) { return false; } var proto = getPrototype(value); @@ -12273,7 +12445,7 @@ * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } @@ -12401,9 +12573,7 @@ * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] */ - var at = baseRest(function(object, paths) { - return baseAt(object, baseFlatten(paths, 1)); - }); + var at = flatRest(baseAt); /** * Creates an object that inherits from the `prototype` object. If a @@ -13006,7 +13176,7 @@ iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[iteratee(value, key, object)] = value; + baseAssignValue(result, iteratee(value, key, object), value); }); return result; } @@ -13044,7 +13214,7 @@ iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[key] = iteratee(value, key, object); + baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } @@ -13088,7 +13258,7 @@ * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: + * method instead. The `customizer` is invoked with six arguments: * (objValue, srcValue, key, object, source, stack). * * **Note:** This method mutates `object`. @@ -13138,11 +13308,11 @@ * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ - var omit = baseRest(function(object, props) { + var omit = flatRest(function(object, props) { if (object == null) { return {}; } - props = arrayMap(baseFlatten(props, 1), toKey); + props = arrayMap(props, toKey); return basePick(object, baseDifference(getAllKeysIn(object), props)); }); @@ -13187,8 +13357,8 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = baseRest(function(object, props) { - return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); + var pick = flatRest(function(object, props) { + return object == null ? {} : basePick(object, arrayMap(props, toKey)); }); /** @@ -13842,8 +14012,8 @@ } /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -13854,12 +14024,6 @@ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. @@ -14102,15 +14266,12 @@ * // => [6, 8, 10] */ function parseInt(string, radix, guard) { - // Chrome fails to trim leading whitespace characters. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details. if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } - string = toString(string).replace(reTrim, ''); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + return nativeParseInt(toString(string), radix || 0); } /** @@ -14349,7 +14510,8 @@ * compiled({ 'user': 'barney' }); * // => 'hello barney!' * - * // Use the ES delimiter as an alternative to the default "interpolate" delimiter. + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. * var compiled = _.template('hello ${ user }!'); * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' @@ -14750,7 +14912,7 @@ /** * The inverse of `_.escape`; this method converts the HTML entities - * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to + * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional @@ -14904,10 +15066,10 @@ * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ - var bindAll = baseRest(function(object, methodNames) { - arrayEach(baseFlatten(methodNames, 1), function(key) { + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { key = toKey(key); - object[key] = bind(object[key], object); + baseAssignValue(object, key, bind(object[key], object)); }); return object; }); diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 867ecf2a32..1168cf78bd 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -2,131 +2,131 @@ * @license * lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE */ -;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u=n?t:n)),t}function gn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==P)return c;if(!uu(t))return t;if(o=Fi(t)){if(c=he(t),!n)return Wr(t,c)}else{var a=St(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Pi(t))return Er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){ -if(C(t))return i?t:{};if(c=pe(l?{}:t),!n)return Lr(t,pn(c,t))}else{if(!Tt[a])return i?t:{};c=_e(t,a,gn,n)}}if(f||(f=new Gt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?Rn(t,bu,Ho):bu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),ln(c,o,gn(u,n,r,e,o,t,f))}),c}function dn(t){var n=bu(t);return function(r){return yn(r,t,n)}}function yn(t,n,r){var e=r.length;if(null==t)return!e;for(t=Tu(t);e--;){var u=r[e],o=n[u],i=t[u];if(i===P&&!(u in t)||!o(i))return false}return true}function bn(t){return uu(t)?oo(t):{}; -}function xn(t,n,r){if(typeof t!="function")throw new Nu("Expected a function");return ni(function(){t.apply(P,r)},n)}function jn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),e?(o=a,i=false):200<=n.length&&(o=R,i=false,n=new Kt(n));t:for(;++un}function Bn(t,n){return null!=t&&Gu.call(t,n)}function Ln(t,n){return null!=t&&n in Tu(t)}function Cn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Cu(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,S(n))),s=jo(p.length,s),f[i]=!r&&(n||120<=u&&120<=p.length)?new Kt(i&&p):P}var p=t[0],_=-1,v=f[0];t:for(;++_n?r:0,ge(n,r)?t[n]:P}function nr(t,n,r){var e=-1;return n=l(n.length?n:[Ou],S(fe())),t=Yn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t -}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function rr(t,n){return t=Tu(t),er(t,n,function(n,r){return r in t})}function er(t,n,r){for(var e=-1,u=n.length,o={};++en||9007199254740991n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Cu(u);++e=u){for(;e>>1,i=t[o];null!==i&&!au(i)&&(r?i<=n:i=e?t:sr(t,n,r)}function Er(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Or(t){var n=new t.constructor(t.byteLength);return new ro(n).set(new ro(t)),n}function Sr(t,n){if(t!==n){var r=t!==P,e=null===t,u=t===t,o=au(t),i=n!==P,f=null===n,c=n===n,a=au(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&tu?P:o,u=1),n=Tu(n);++ei&&f[0]!==a&&f[i-1]!==a?[]:z(f,a),i-=c.length,ir?r?cr(n,t):n:(r=cr(n,ho(t/$(n))), -Ut.test(n)?kr(F(r),0,t).join(""):r.slice(0,t))}function Yr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Cu(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++an||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4), -(r=h[3])&&(e=o[3],o[3]=e?Ir(e,r,h[4]):r,o[4]=e?z(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?Rr(e,r,h[6]):r,o[6]=e?z(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:jo(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:xo(o[9]-a,0),!f&&24&n&&(n&=-25),ri((h?Ko:ti)(n&&1!=n?8==n||16==n?Nr(t,n,f):32!=n&&33!=n||u.length?qr.apply(P,o):Yr(t,n,r,e):Dr(t,n,r),o),t,n)}function ee(t,n,r,e,u,o){ -var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if((c=o.get(t))&&o.get(n))return c==n;var c=-1,a=true,l=1&u?new Kt:P;for(o.set(t,n),o.set(n,t);++cr&&(r=xo(e+r,0)),g(t,fe(n,3),r)):-1}function Ie(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==P&&(u=hu(r),u=0>r?xo(e+u,0):jo(u,e-1)),g(t,fe(n,3),u,true)}function Re(t){return t&&t.length?t[0]:P}function We(t){ -var n=t?t.length:0;return n?t[n-1]:P}function Be(t,n){return t&&t.length&&n&&n.length?or(t,n):t}function Le(t){return t?Ao.call(t):t}function Ce(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(Xe(t))return n=xo(t.length,n),true}),E(n,function(n){return l(t,j(n))})}function Ue(t,n){if(!t||!t.length)return[];var e=Ce(t);return null==n?e:l(e,function(t){return r(n,P,t)})}function Me(t){return t=It(t),t.__chain__=true,t}function ze(t,n){return n(t)}function De(){return this}function Te(t,n){ -return(Fi(t)?u:Po)(t,fe(n,3))}function $e(t,n){return(Fi(t)?o:Zo)(t,fe(n,3))}function Fe(t,n){return(Fi(t)?l:Yn)(t,fe(n,3))}function Ne(t,n,r){var e=-1,u=lu(t),o=u.length,i=o-1;for(n=(r?de(t,n,r):n===P)?1:vn(hu(n),0,o);++e=t&&(n=P),r}}function qe(t,n,r){return n=r?P:n,t=re(t,8,P,P,P,P,P,n),t.placeholder=qe.placeholder,t}function Ve(t,n,r){return n=r?P:n,t=re(t,16,P,P,P,P,P,n),t.placeholder=Ve.placeholder,t}function Ke(t,n,r){function e(n){var r=c,e=a;return c=a=P,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===P||r>=n||0>r||g&&t>=l}function o(){var t=Ri();if(u(t))return i(t);var r,e=ni;r=t-_,t=n-(t-p),r=g?jo(t,l-r):t,h=e(o,r)}function i(t){return h=P,d&&c?e(t):(c=a=P,s)}function f(){var t=Ri(),r=u(t);if(c=arguments, -a=this,p=t,r){if(h===P)return _=t=p,h=ni(o,n),v?e(t):s;if(g)return h=ni(o,n),e(p)}return h===P&&(h=ni(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Nu("Expected a function");return n=_u(n)||0,uu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?xo(_u(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==P&&Go(h),_=0,c=p=a=h=P},f.flush=function(){return h===P?s:i(Ri())},f}function Ge(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e), -r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Nu("Expected a function");return r.cache=new(Ge.Cache||qt),r}function Je(t){if(typeof t!="function")throw new Nu("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Ye(t,n){return t===n||t!==t&&n!==n}function He(t){return Xe(t)&&Gu.call(t,"callee")&&(!io.call(t,"callee")||"[object Arguments]"==Hu.call(t)); -}function Qe(t){return null!=t&&eu(t.length)&&!nu(t)}function Xe(t){return ou(t)&&Qe(t)}function tu(t){return!!ou(t)&&("[object Error]"==Hu.call(t)||typeof t.message=="string"&&typeof t.name=="string")}function nu(t){return t=uu(t)?Hu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ru(t){return typeof t=="number"&&t==hu(t)}function eu(t){return typeof t=="number"&&-1=t}function uu(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function ou(t){ -return!!t&&typeof t=="object"}function iu(t){return typeof t=="number"||ou(t)&&"[object Number]"==Hu.call(t)}function fu(t){return!(!ou(t)||"[object Object]"!=Hu.call(t)||C(t))&&(t=eo(t),null===t||(t=Gu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ku.call(t)==Yu))}function cu(t){return typeof t=="string"||!Fi(t)&&ou(t)&&"[object String]"==Hu.call(t)}function au(t){return typeof t=="symbol"||ou(t)&&"[object Symbol]"==Hu.call(t)}function lu(t){if(!t)return[];if(Qe(t))return cu(t)?F(t):Wr(t); -if(uo&&t[uo]){t=t[uo]();for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}return n=St(t),("[object Map]"==n?U:"[object Set]"==n?D:wu)(t)}function su(t){return t?(t=_u(t),t===Z||t===-Z?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function hu(t){t=su(t);var n=t%1;return t===t?n?t-n:t:0}function pu(t){return t?vn(hu(t),0,4294967295):0}function _u(t){if(typeof t=="number")return t;if(au(t))return q;if(uu(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t,t=uu(t)?t+"":t),typeof t!="string")return 0===t?t:+t; -t=t.replace(at,"");var n=jt.test(t);return n||mt.test(t)?Pt(t.slice(2),n?2:8):xt.test(t)?q:+t}function vu(t){return Br(t,xu(t))}function gu(t){return null==t?"":dr(t)}function du(t,n,r){return t=null==t?P:In(t,n),t===P?r:t}function yu(t,n){return null!=t&&se(t,n,Ln)}function bu(t){return Qe(t)?Yt(t):Kn(t)}function xu(t){return Qe(t)?Yt(t,true):Gn(t)}function ju(t,n){return null==t?{}:er(t,Rn(t,xu,Qo),fe(n))}function wu(t){return t?I(t,bu(t)):[]}function mu(t){return jf(gu(t).toLowerCase())}function Au(t){ -return(t=gu(t))&&t.replace(kt,un).replace(Bt,"")}function ku(t,n,r){return t=gu(t),n=r?P:n,n===P?Mt.test(t)?t.match(Ct)||[]:t.match(vt)||[]:t.match(n)||[]}function Eu(t){return function(){return t}}function Ou(t){return t}function Su(t){return Vn(typeof t=="function"?t:gn(t,true))}function Iu(t,n,r){var e=bu(n),o=Sn(n,e);null!=r||uu(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=Sn(n,bu(n)));var i=!(uu(r)&&"chain"in r&&!r.chain),f=nu(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){ -var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=Wr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function Ru(){}function Wu(t){return ye(t)?j(Ae(t)):ur(t)}function Bu(){return[]}function Lu(){return false}w=w?cn.defaults(Vt.Object(),w,cn.pick(Vt,zt)):Vt;var Cu=w.Array,Uu=w.Date,Mu=w.Error,zu=w.Function,Du=w.Math,Tu=w.Object,$u=w.RegExp,Fu=w.String,Nu=w.TypeError,Pu=Cu.prototype,Zu=Tu.prototype,qu=w["__core-js_shared__"],Vu=function(){ -var t=/[^.]+$/.exec(qu&&qu.keys&&qu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ku=zu.prototype.toString,Gu=Zu.hasOwnProperty,Ju=0,Yu=Ku.call(Tu),Hu=Zu.toString,Qu=Vt._,Xu=$u("^"+Ku.call(Gu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),to=Jt?w.Buffer:P,no=w.Symbol,ro=w.Uint8Array,eo=M(Tu.getPrototypeOf,Tu),uo=no?no.iterator:P,oo=Tu.create,io=Zu.propertyIsEnumerable,fo=Pu.splice,co=no?no.isConcatSpreadable:P,ao=w.clearTimeout!==Vt.clearTimeout&&w.clearTimeout,lo=Uu&&Uu.now!==Vt.Date.now&&Uu.now,so=w.setTimeout!==Vt.setTimeout&&w.setTimeout,ho=Du.ceil,po=Du.floor,_o=Tu.getOwnPropertySymbols,vo=to?to.isBuffer:P,go=w.isFinite,yo=Pu.join,bo=M(Tu.keys,Tu),xo=Du.max,jo=Du.min,wo=w.parseInt,mo=Du.random,Ao=Pu.reverse,ko=le(w,"DataView"),Eo=le(w,"Map"),Oo=le(w,"Promise"),So=le(w,"Set"),Io=le(w,"WeakMap"),Ro=le(Tu,"create"),Wo=function(){ -var t=le(Tu,"defineProperty"),n=le.name;return n&&2t)&&(t==n.length-1?n.pop():fo.call(n,t,1),true)},Zt.prototype.get=function(t){var n=this.__data__;return t=sn(n,t),0>t?P:n[t][1]},Zt.prototype.has=function(t){return-1e?r.push([t,n]):r[e][1]=n,this},qt.prototype.clear=function(){this.__data__={hash:new Ft,map:new(Eo||Zt),string:new Ft}},qt.prototype.delete=function(t){return ce(this,t).delete(t)},qt.prototype.get=function(t){return ce(this,t).get(t); -},qt.prototype.has=function(t){return ce(this,t).has(t)},qt.prototype.set=function(t,n){return ce(this,t).set(t,n),this},Kt.prototype.add=Kt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Kt.prototype.has=function(t){return this.__data__.has(t)},Gt.prototype.clear=function(){this.__data__=new Zt},Gt.prototype.delete=function(t){return this.__data__.delete(t)},Gt.prototype.get=function(t){return this.__data__.get(t)},Gt.prototype.has=function(t){return this.__data__.has(t); -},Gt.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Zt){if(r=r.__data__,!Eo||199>r.length)return r.push([t,n]),this;r=this.__data__=new qt(r)}return r.set(t,n),this};var Po=Mr(En),Zo=Mr(On,true),qo=zr(),Vo=zr(true),Ko=Bo?function(t,n){return Bo.set(t,n),t}:Ou,Go=ao||function(t){return Vt.clearTimeout(t)},Jo=So&&1/D(new So([,-0]))[1]==Z?function(t){return new So(t)}:Ru,Yo=Bo?function(t){return Bo.get(t)}:Ru,Ho=_o?M(_o,Tu):Bu,Qo=_o?function(t){for(var n=[];t;)s(n,Ho(t)),t=eo(t);return n; -}:Bu;(ko&&"[object DataView]"!=St(new ko(new ArrayBuffer(1)))||Eo&&"[object Map]"!=St(new Eo)||Oo&&"[object Promise]"!=St(Oo.resolve())||So&&"[object Set]"!=St(new So)||Io&&"[object WeakMap]"!=St(new Io))&&(St=function(t){var n=Hu.call(t);if(t=(t="[object Object]"==n?t.constructor:P)?ke(t):P)switch(t){case Uo:return"[object DataView]";case Mo:return"[object Map]";case zo:return"[object Promise]";case Do:return"[object Set]";case To:return"[object WeakMap]"}return n});var Xo=qu?nu:Lu,ti=function(){ -var t=0,n=0;return function(r,e){var u=Ri(),o=16-(u-n);if(n=u,0=n}),Fi=Cu.isArray,Ni=Ht?S(Ht):zn,Pi=vo||Lu,Zi=Qt?S(Qt):Dn,qi=Xt?S(Xt):$n,Vi=tn?S(tn):Pn,Ki=nn?S(nn):Zn,Gi=rn?S(rn):qn,Ji=Qr(Jn),Yi=Qr(function(t,n){return t<=n}),Hi=Ur(function(t,n){if(Lo||xe(n)||Qe(n))Br(n,bu(n),t);else for(var r in n)Gu.call(n,r)&&ln(t,r,n[r]); -}),Qi=Ur(function(t,n){Br(n,xu(n),t)}),Xi=Ur(function(t,n,r,e){Br(n,xu(n),t,e)}),tf=Ur(function(t,n,r,e){Br(n,bu(n),t,e)}),nf=ar(function(t,n){return _n(t,kn(n,1))}),rf=ar(function(t){return t.push(P,en),r(Xi,P,t)}),ef=ar(function(t){return t.push(P,we),r(af,P,t)}),uf=Vr(function(t,n,r){t[n]=r},Eu(Ou)),of=Vr(function(t,n,r){Gu.call(t,n)?t[n].push(r):t[n]=[r]},fe),ff=ar(Mn),cf=Ur(function(t,n,r){Xn(t,n,r)}),af=Ur(function(t,n,r,e){Xn(t,n,r,e)}),lf=ar(function(t,n){return null==t?{}:(n=l(kn(n,1),Ae), -rr(t,jn(Rn(t,xu,Qo),n)))}),sf=ar(function(t,n){return null==t?{}:rr(t,l(kn(n,1),Ae))}),hf=ne(bu),pf=ne(xu),_f=$r(function(t,n,r){return n=n.toLowerCase(),t+(r?mu(n):n)}),vf=$r(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),gf=$r(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),df=Tr("toLowerCase"),yf=$r(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),bf=$r(function(t,n,r){return t+(r?" ":"")+jf(n)}),xf=$r(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),jf=Tr("toUpperCase"),wf=ar(function(t,n){ -try{return r(t,P,n)}catch(t){return tu(t)?t:new Mu(t)}}),mf=ar(function(t,n){return u(kn(n,1),function(n){n=Ae(n),t[n]=Wi(t[n],t)}),t}),Af=Zr(),kf=Zr(true),Ef=ar(function(t,n){return function(r){return Mn(r,t,n)}}),Of=ar(function(t,n){return function(r){return Mn(t,r,n)}}),Sf=Gr(l),If=Gr(i),Rf=Gr(_),Wf=Hr(),Bf=Hr(true),Lf=Kr(function(t,n){return t+n},0),Cf=te("ceil"),Uf=Kr(function(t,n){return t/n},1),Mf=te("floor"),zf=Kr(function(t,n){return t*n},1),Df=te("round"),Tf=Kr(function(t,n){return t-n},0);return It.after=function(t,n){ -if(typeof n!="function")throw new Nu("Expected a function");return t=hu(t),function(){if(1>--t)return n.apply(this,arguments)}},It.ary=Pe,It.assign=Hi,It.assignIn=Qi,It.assignInWith=Xi,It.assignWith=tf,It.at=nf,It.before=Ze,It.bind=Wi,It.bindAll=mf,It.bindKey=Bi,It.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Fi(t)?t:[t]},It.chain=Me,It.chunk=function(t,n,r){if(n=(r?de(t,n,r):n===P)?1:xo(hu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Cu(ho(r/n));en?0:n,e)):[]},It.dropRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),n=e-n,sr(t,0,0>n?0:n)):[]},It.dropRightWhile=function(t,n){ -return t&&t.length?br(t,fe(n,3),true,true):[]},It.dropWhile=function(t,n){return t&&t.length?br(t,fe(n,3),true):[]},It.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&de(t,n,r)&&(r=0,e=u),u=t.length,r=hu(r),0>r&&(r=-r>u?0:u+r),e=e===P||e>u?u:hu(e),0>e&&(e+=u),e=r>e?0:pu(e);r>>0,r?(t=gu(t))&&(typeof n=="string"||null!=n&&!Vi(n))&&(n=dr(n),!n&&Ut.test(t))?kr(F(t),0,r):t.split(n,r):[]},It.spread=function(t,n){if(typeof t!="function")throw new Nu("Expected a function");return n=n===P?0:xo(hu(n),0),ar(function(e){ -var u=e[n];return e=kr(e,0,n),u&&s(e,u),r(t,this,e)})},It.tail=function(t){var n=t?t.length:0;return n?sr(t,1,n):[]},It.take=function(t,n,r){return t&&t.length?(n=r||n===P?1:hu(n),sr(t,0,0>n?0:n)):[]},It.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),n=e-n,sr(t,0>n?0:n,e)):[]},It.takeRightWhile=function(t,n){return t&&t.length?br(t,fe(n,3),false,true):[]},It.takeWhile=function(t,n){return t&&t.length?br(t,fe(n,3)):[]},It.tap=function(t,n){return n(t),t},It.throttle=function(t,n,r){ -var e=true,u=true;if(typeof t!="function")throw new Nu("Expected a function");return uu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Ke(t,n,{leading:e,maxWait:n,trailing:u})},It.thru=ze,It.toArray=lu,It.toPairs=hf,It.toPairsIn=pf,It.toPath=function(t){return Fi(t)?l(t,Ae):au(t)?[t]:Wr(ei(t))},It.toPlainObject=vu,It.transform=function(t,n,r){var e=Fi(t)||Gi(t);if(n=fe(n,4),null==r)if(e||uu(t)){var o=t.constructor;r=e?Fi(t)?new o:[]:nu(o)?bn(eo(t)):{}}else r={};return(e?u:En)(t,function(t,e,u){ -return n(r,t,e,u)}),r},It.unary=function(t){return Pe(t,1)},It.union=hi,It.unionBy=pi,It.unionWith=_i,It.uniq=function(t){return t&&t.length?yr(t):[]},It.uniqBy=function(t,n){return t&&t.length?yr(t,fe(n,2)):[]},It.uniqWith=function(t,n){return t&&t.length?yr(t,P,n):[]},It.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ye(e,r)?[e]:Ar(e);r=me(r,e),e=Ae(We(e)),r=!(null!=r&&Gu.call(r,e))||delete r[e]}return r},It.unzip=Ce,It.unzipWith=Ue,It.update=function(t,n,r){return null==t?t:lr(t,n,(typeof r=="function"?r:Ou)(In(t,n)),void 0); -},It.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null!=t&&(t=lr(t,n,(typeof r=="function"?r:Ou)(In(t,n)),e)),t},It.values=wu,It.valuesIn=function(t){return null==t?[]:I(t,xu(t))},It.without=vi,It.words=ku,It.wrap=function(t,n){return n=null==n?Ou:n,Mi(n,t)},It.xor=gi,It.xorBy=di,It.xorWith=yi,It.zip=bi,It.zipObject=function(t,n){return wr(t||[],n||[],ln)},It.zipObjectDeep=function(t,n){return wr(t||[],n||[],lr)},It.zipWith=xi,It.entries=hf,It.entriesIn=pf,It.extend=Qi,It.extendWith=Xi, -Iu(It,It),It.add=Lf,It.attempt=wf,It.camelCase=_f,It.capitalize=mu,It.ceil=Cf,It.clamp=function(t,n,r){return r===P&&(r=n,n=P),r!==P&&(r=_u(r),r=r===r?r:0),n!==P&&(n=_u(n),n=n===n?n:0),vn(_u(t),n,r)},It.clone=function(t){return gn(t,false,true)},It.cloneDeep=function(t){return gn(t,true,true)},It.cloneDeepWith=function(t,n){return gn(t,true,true,n)},It.cloneWith=function(t,n){return gn(t,false,true,n)},It.conformsTo=function(t,n){return null==n||yn(t,n,bu(n))},It.deburr=Au,It.defaultTo=function(t,n){return null==t||t!==t?n:t; -},It.divide=Uf,It.endsWith=function(t,n,r){t=gu(t),n=dr(n);var e=t.length,e=r=r===P?e:vn(hu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n},It.eq=Ye,It.escape=function(t){return(t=gu(t))&&X.test(t)?t.replace(H,on):t},It.escapeRegExp=function(t){return(t=gu(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},It.every=function(t,n,r){var e=Fi(t)?i:wn;return r&&de(t,n,r)&&(n=P),e(t,fe(n,3))},It.find=mi,It.findIndex=Se,It.findKey=function(t,n){return v(t,fe(n,3),En)},It.findLast=Ai,It.findLastIndex=Ie,It.findLastKey=function(t,n){ -return v(t,fe(n,3),On)},It.floor=Mf,It.forEach=Te,It.forEachRight=$e,It.forIn=function(t,n){return null==t?t:qo(t,fe(n,3),xu)},It.forInRight=function(t,n){return null==t?t:Vo(t,fe(n,3),xu)},It.forOwn=function(t,n){return t&&En(t,fe(n,3))},It.forOwnRight=function(t,n){return t&&On(t,fe(n,3))},It.get=du,It.gt=Ti,It.gte=$i,It.has=function(t,n){return null!=t&&se(t,n,Bn)},It.hasIn=yu,It.head=Re,It.identity=Ou,It.includes=function(t,n,r,e){return t=Qe(t)?t:wu(t),r=r&&!e?hu(r):0,e=t.length,0>r&&(r=xo(e+r,0)), -cu(t)?r<=e&&-1r&&(r=xo(e+r,0)),d(t,n,r)):-1},It.inRange=function(t,n,r){return n=su(n),r===P?(r=n,n=0):r=su(r),t=_u(t),t>=jo(n,r)&&t=t},It.isSet=Ki,It.isString=cu,It.isSymbol=au,It.isTypedArray=Gi,It.isUndefined=function(t){return t===P},It.isWeakMap=function(t){return ou(t)&&"[object WeakMap]"==St(t)},It.isWeakSet=function(t){return ou(t)&&"[object WeakSet]"==Hu.call(t)},It.join=function(t,n){return t?yo.call(t,n):""},It.kebabCase=vf,It.last=We,It.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==P&&(u=hu(r), -u=(0>u?xo(e+u,0):jo(u,e-1))+1),n!==n)return g(t,b,u-1,true);for(;u--;)if(t[u]===n)return u;return-1},It.lowerCase=gf,It.lowerFirst=df,It.lt=Ji,It.lte=Yi,It.max=function(t){return t&&t.length?mn(t,Ou,Wn):P},It.maxBy=function(t,n){return t&&t.length?mn(t,fe(n,2),Wn):P},It.mean=function(t){return x(t,Ou)},It.meanBy=function(t,n){return x(t,fe(n,2))},It.min=function(t){return t&&t.length?mn(t,Ou,Jn):P},It.minBy=function(t,n){return t&&t.length?mn(t,fe(n,2),Jn):P},It.stubArray=Bu,It.stubFalse=Lu,It.stubObject=function(){ -return{}},It.stubString=function(){return""},It.stubTrue=function(){return true},It.multiply=zf,It.nth=function(t,n){return t&&t.length?tr(t,hu(n)):P},It.noConflict=function(){return Vt._===this&&(Vt._=Qu),this},It.noop=Ru,It.now=Ri,It.pad=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return!n||e>=n?t:(n=(n-e)/2,Jr(po(n),r)+t+Jr(ho(n),r))},It.padEnd=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return n&&en){var e=t;t=n,n=e}return r||t%1||n%1?(r=mo(),jo(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):fr(t,n)},It.reduce=function(t,n,r){var e=Fi(t)?h:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Po); -},It.reduceRight=function(t,n,r){var e=Fi(t)?p:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Zo)},It.repeat=function(t,n,r){return n=(r?de(t,n,r):n===P)?1:hu(n),cr(gu(t),n)},It.replace=function(){var t=arguments,n=gu(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},It.result=function(t,n,r){n=ye(n,t)?[n]:Ar(n);var e=-1,u=n.length;for(u||(t=P,u=1);++et||9007199254740991=o)return t;if(o=r-$(e),1>o)return e;if(r=i?kr(i,0,o).join(""):t.slice(0,o),u===P)return r+e;if(i&&(o+=r.length-o),Vi(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=$u(u.source,gu(yt.exec(u))+"g")), -u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===P?o:c)}}else t.indexOf(dr(u),o)!=o&&(u=r.lastIndexOf(u),-1u.__dir__?"Right":"")}),u},$t.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;$t.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({ -iteratee:fe(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");$t.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");$t.prototype[t]=function(){return this.__filtered__?new $t(this):this[r](1)}}),$t.prototype.compact=function(){return this.filter(Ou)},$t.prototype.find=function(t){return this.filter(t).head()},$t.prototype.findLast=function(t){return this.reverse().find(t); -},$t.prototype.invokeMap=ar(function(t,n){return typeof t=="function"?new $t(this):this.map(function(r){return Mn(r,t,n)})}),$t.prototype.reject=function(t){return this.filter(Je(fe(t)))},$t.prototype.slice=function(t,n){t=hu(t);var r=this;return r.__filtered__&&(0n)?new $t(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==P&&(n=hu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},$t.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$t.prototype.toArray=function(){return this.take(4294967295); -},En($t.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=It[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(It.prototype[n]=function(){function n(t){return t=u.apply(It,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof $t,a=f[0],l=c||Fi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new $t(this),i=t.apply(i,f),i.__actions__.push({ -func:ze,args:[n],thisArg:P}),new Lt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Pu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);It.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Fi(u)?u:[],t)}return this[r](function(r){return n.apply(Fi(r)?r:[],t)})}}),En($t.prototype,function(t,n){var r=It[n];if(r){var e=r.name+""; -(Co[e]||(Co[e]=[])).push({name:n,func:r})}}),Co[qr(P,2).name]=[{name:"wrapper",func:P}],$t.prototype.clone=function(){var t=new $t(this.__wrapped__);return t.__actions__=Wr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wr(this.__views__),t},$t.prototype.reverse=function(){if(this.__filtered__){var t=new $t(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t; -},$t.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Fi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++co||o==t&&a==t)return xr(n,this.__actions__);e=[];t:for(;t--&&c=this.__values__.length,n=t?P:this.__values__[this.__index__++];return{done:t,value:n}},It.prototype.plant=function(t){ -for(var n,r=this;r instanceof Rt;){var e=Oe(r);e.__index__=0,e.__values__=P,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},It.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof $t?(this.__actions__.length&&(t=new $t(this)),t=t.reverse(),t.__actions__.push({func:ze,args:[Le],thisArg:P}),new Lt(t,this.__chain__)):this.thru(Le)},It.prototype.toJSON=It.prototype.valueOf=It.prototype.value=function(){return xr(this.__wrapped__,this.__actions__)},It.prototype.first=It.prototype.head, -uo&&(It.prototype[uo]=De),It}var P,Z=1/0,q=NaN,V=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/^\./,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,vt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,bt=/^0x/i,xt=/^[-+]0x[0-9a-f]+$/i,jt=/^0b[01]+$/i,wt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,At=/^(?:0|[1-9]\d*)$/,kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,Ot=/['\n\r\u2028\u2029\\]/g,St="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",It="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+St,Rt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Wt=RegExp("['\u2019]","g"),Bt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Lt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Rt+St,"g"),Ct=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",It].join("|"),"g"),Ut=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Dt={}; -Dt["[object Float32Array]"]=Dt["[object Float64Array]"]=Dt["[object Int8Array]"]=Dt["[object Int16Array]"]=Dt["[object Int32Array]"]=Dt["[object Uint8Array]"]=Dt["[object Uint8ClampedArray]"]=Dt["[object Uint16Array]"]=Dt["[object Uint32Array]"]=true,Dt["[object Arguments]"]=Dt["[object Array]"]=Dt["[object ArrayBuffer]"]=Dt["[object Boolean]"]=Dt["[object DataView]"]=Dt["[object Date]"]=Dt["[object Error]"]=Dt["[object Function]"]=Dt["[object Map]"]=Dt["[object Number]"]=Dt["[object Object]"]=Dt["[object RegExp]"]=Dt["[object Set]"]=Dt["[object String]"]=Dt["[object WeakMap]"]=false; -var Tt={};Tt["[object Arguments]"]=Tt["[object Array]"]=Tt["[object ArrayBuffer]"]=Tt["[object DataView]"]=Tt["[object Boolean]"]=Tt["[object Date]"]=Tt["[object Float32Array]"]=Tt["[object Float64Array]"]=Tt["[object Int8Array]"]=Tt["[object Int16Array]"]=Tt["[object Int32Array]"]=Tt["[object Map]"]=Tt["[object Number]"]=Tt["[object Object]"]=Tt["[object RegExp]"]=Tt["[object Set]"]=Tt["[object String]"]=Tt["[object Symbol]"]=Tt["[object Uint8Array]"]=Tt["[object Uint8ClampedArray]"]=Tt["[object Uint16Array]"]=Tt["[object Uint32Array]"]=true, -Tt["[object Error]"]=Tt["[object Function]"]=Tt["[object WeakMap]"]=false;var $t,Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nt=parseFloat,Pt=parseInt,Zt=typeof global=="object"&&global&&global.Object===Object&&global,qt=typeof self=="object"&&self&&self.Object===Object&&self,Vt=Zt||qt||Function("return this")(),Kt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,Jt=Gt&&Gt.exports===Kt,Yt=Jt&&Zt.g; -t:{try{$t=Yt&&Yt.f("util");break t}catch(t){}$t=void 0}var Ht=$t&&$t.isArrayBuffer,Qt=$t&&$t.isDate,Xt=$t&&$t.isMap,tn=$t&&$t.isRegExp,nn=$t&&$t.isSet,rn=$t&&$t.isTypedArray,en=j("length"),un=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I", +;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,i=t?t.length:0;++u=n?t:n)),t}function vn(t,n,r,e,i,o,f){var c;if(e&&(c=o?e(t,i,o,f):e(t)),c!==N)return c;if(!cu(t))return t;if(i=Ko(t)){if(c=he(t),!n)return Rr(t,c)}else{var a=Et(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Jo(t))return kr(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!o){ +if(c=pe(l?{}:t),!n)return Wr(t,sn(c,t))}else{if(!Mt[a])return o?t:{};c=_e(t,a,vn,n)}}if(f||(f=new Vt),o=f.get(t))return o;if(f.set(t,c),!i)var s=r?In(t,mu,ro):mu(t);return u(s||t,function(u,i){s&&(i=u,u=t[i]),cn(c,i,vn(u,n,r,e,i,t,f))}),c}function gn(t){var n=mu(t);return function(r){return dn(r,t,n)}}function dn(t,n,r){var e=r.length;if(null==t)return!e;for(t=Pu(t);e--;){var u=r[e],i=n[u],o=t[u];if(o===N&&!(u in t)||!i(o))return false}return true}function yn(t){return cu(t)?li(t):{}}function bn(t,n,r){ +if(typeof t!="function")throw new Vu("Expected a function");return oo(function(){t.apply(N,r)},n)}function xn(t,n,r,e){var u=-1,i=c,o=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),e?(i=a,o=false):200<=n.length&&(i=R,o=false,n=new qt(n));t:for(;++un}function zn(t,n){return null!=t&&Qu.call(t,n)}function Wn(t,n){return null!=t&&n in Pu(t)}function Bn(t,n,r){for(var e=r?a:c,u=t[0].length,i=t.length,o=i,f=Du(i),s=1/0,h=[];o--;){var p=t[o];o&&n&&(p=l(p,S(n))),s=ki(p.length,s),f[o]=!r&&(n||120<=u&&120<=p.length)?new qt(o&&p):N}var p=t[0],_=-1,v=f[0];t:for(;++_n?r:0,ge(n,r)?t[n]:N}function tr(t,n,r){var e=-1;return n=l(n.length?n:[zu],S(fe())),t=Jn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,i=n.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function nr(t,n){return t=Pu(t),rr(t,n,function(n,r){return r in t})}function rr(t,n,r){for(var e=-1,u=n.length,i={};++en||9007199254740991n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Du(u);++e=u){for(;e>>1,o=t[i];null!==o&&!pu(o)&&(r?o<=n:o=e?t:lr(t,n,r)}function kr(t,n){ +if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Er(t){var n=new t.constructor(t.byteLength);return new oi(n).set(new oi(t)),n}function Or(t,n){if(t!==n){var r=t!==N,e=null===t,u=t===t,i=pu(t),o=n!==N,f=null===n,c=n===n,a=pu(n);if(!f&&!a&&!i&&t>n||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&tu?N:i,u=1),n=Pu(n);++eo&&f[0]!==a&&f[o-1]!==a?[]:U(f,a),o-=c.length,or?r?fr(n,t):n:(r=fr(n,di(t/T(n))),Bt.test(n)?Ar($(r),0,t).join(""):r.slice(0,t))}function Jr(t,n,e,u){function i(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Du(l+c),h=this&&this!==Zt&&this instanceof i?f:t;++an||e)&&(1&t&&(i[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Sr(e,r,h[4]):r,i[4]=e?U(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Ir(e,r,h[6]):r,i[6]=e?U(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&t&&(i[8]=null==i[8]?h[8]:ki(i[8],h[8])), +null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=n),t=i[0],n=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:t.length:Ai(i[9]-a,0),!f&&24&n&&(n&=-25),ke((h?Hi:io)(n&&1!=n?8==n||16==n?Fr(t,n,f):32!=n&&33!=n||u.length?Zr.apply(N,i):Jr(t,n,r,e):Mr(t,n,r),i),t,n)}function re(t,n,r,e,u,i){var o=2&u,f=t.length,c=n.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(t))&&i.get(n))return c==n;var c=-1,a=true,l=1&u?new qt:N;for(i.set(t,n),i.set(n,t);++cr&&(r=Ai(e+r,0)),g(t,fe(n,3),r)):-1}function Be(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==N&&(u=gu(r), +u=0>r?Ai(e+u,0):ki(u,e-1)),g(t,fe(n,3),u,true)}function Le(t){return t&&t.length?An(t,1):[]}function Ce(t){return t&&t.length?t[0]:N}function Ue(t){var n=t?t.length:0;return n?t[n-1]:N}function Me(t,n){return t&&t.length&&n&&n.length?ur(t,n):t}function De(t){return t?Ii.call(t):t}function Te(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(eu(t))return n=Ai(t.length,n),true}),E(n,function(n){return l(t,j(n))})}function $e(t,n){if(!t||!t.length)return[];var e=Te(t);return null==n?e:l(e,function(t){ +return r(n,N,t)})}function Fe(t){return t=Ot(t),t.__chain__=true,t}function Ne(t,n){return n(t)}function Pe(){return this}function Ze(t,n){return(Ko(t)?u:Ki)(t,fe(n,3))}function qe(t,n){return(Ko(t)?i:Gi)(t,fe(n,3))}function Ve(t,n){return(Ko(t)?l:Jn)(t,fe(n,3))}function Ke(t,n,r){return n=r?N:n,n=t&&null==n?t.length:n,ne(t,128,N,N,N,N,n)}function Ge(t,n){var r;if(typeof n!="function")throw new Vu("Expected a function");return t=gu(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=N), +r}}function Je(t,n,r){return n=r?N:n,t=ne(t,8,N,N,N,N,N,n),t.placeholder=Je.placeholder,t}function Ye(t,n,r){return n=r?N:n,t=ne(t,16,N,N,N,N,N,n),t.placeholder=Ye.placeholder,t}function He(t,n,r){function e(n){var r=c,e=a;return c=a=N,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===N||r>=n||0>r||g&&t>=l}function i(){var t=Uo();if(u(t))return o(t);var r,e=oo;r=t-_,t=n-(t-p),r=g?ki(t,l-r):t,h=e(i,r)}function o(t){return h=N,d&&c?e(t):(c=a=N,s)}function f(){var t=Uo(),r=u(t);if(c=arguments, +a=this,p=t,r){if(h===N)return _=t=p,h=oo(i,n),v?e(t):s;if(g)return h=oo(i,n),e(p)}return h===N&&(h=oo(i,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Vu("Expected a function");return n=yu(n)||0,cu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ai(yu(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==N&&Xi(h),_=0,c=p=a=h=N},f.flush=function(){return h===N?s:o(Uo())},f}function Qe(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=t.apply(this,e), +r.cache=i.set(u,e)||i,e)}if(typeof t!="function"||n&&typeof n!="function")throw new Vu("Expected a function");return r.cache=new(Qe.Cache||Pt),r}function Xe(t){if(typeof t!="function")throw new Vu("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function tu(t,n){return t===n||t!==t&&n!==n}function nu(t){return eu(t)&&Qu.call(t,"callee")&&(!si.call(t,"callee")||"[object Arguments]"==ni.call(t)); +}function ru(t){return null!=t&&fu(t.length)&&!iu(t)}function eu(t){return au(t)&&ru(t)}function uu(t){return!!au(t)&&("[object Error]"==ni.call(t)||typeof t.message=="string"&&typeof t.name=="string")}function iu(t){return t=cu(t)?ni.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ou(t){return typeof t=="number"&&t==gu(t)}function fu(t){return typeof t=="number"&&-1=t}function cu(t){var n=typeof t;return null!=t&&("object"==n||"function"==n); +}function au(t){return null!=t&&typeof t=="object"}function lu(t){return typeof t=="number"||au(t)&&"[object Number]"==ni.call(t)}function su(t){return!(!au(t)||"[object Object]"!=ni.call(t))&&(t=ci(t),null===t||(t=Qu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Hu.call(t)==ti))}function hu(t){return typeof t=="string"||!Ko(t)&&au(t)&&"[object String]"==ni.call(t)}function pu(t){return typeof t=="symbol"||au(t)&&"[object Symbol]"==ni.call(t)}function _u(t){if(!t)return[]; +if(ru(t))return hu(t)?$(t):Rr(t);if(ai&&t[ai]){t=t[ai]();for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}return n=Et(t),("[object Map]"==n?L:"[object Set]"==n?M:Eu)(t)}function vu(t){return t?(t=yu(t),t===P||t===-P?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function gu(t){t=vu(t);var n=t%1;return t===t?n?t-n:t:0}function du(t){return t?_n(gu(t),0,4294967295):0}function yu(t){if(typeof t=="number")return t;if(pu(t))return Z;if(cu(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t, +t=cu(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ct,"");var n=bt.test(t);return n||jt.test(t)?Ft(t.slice(2),n?2:8):yt.test(t)?Z:+t}function bu(t){return zr(t,Au(t))}function xu(t){return null==t?"":gr(t)}function ju(t,n,r){return t=null==t?N:Sn(t,n),t===N?r:t}function wu(t,n){return null!=t&&se(t,n,Wn)}function mu(t){return ru(t)?Gt(t):Vn(t)}function Au(t){return ru(t)?Gt(t,true):Kn(t)}function ku(t,n){return null==t?{}:rr(t,In(t,Au,eo),fe(n))}function Eu(t){return t?I(t,mu(t)):[]}function Ou(t){ +return Of(xu(t).toLowerCase())}function Su(t){return(t=xu(t))&&t.replace(mt,rn).replace(Rt,"")}function Iu(t,n,r){return t=xu(t),n=r?N:n,n===N?Lt.test(t)?t.match(Wt)||[]:t.match(_t)||[]:t.match(n)||[]}function Ru(t){return function(){return t}}function zu(t){return t}function Wu(t){return qn(typeof t=="function"?t:vn(t,true))}function Bu(t,n,r){var e=mu(n),i=On(n,e);null!=r||cu(n)&&(i.length||!e.length)||(r=n,n=t,t=this,i=On(n,mu(n)));var o=!(cu(r)&&"chain"in r&&!r.chain),f=iu(t);return u(i,function(r){ +var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(o||n){var r=t(this.__wrapped__);return(r.__actions__=Rr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function Lu(){}function Cu(t){return ye(t)?j(Se(t)):er(t)}function Uu(){return[]}function Mu(){return false}w=w?on.defaults(Zt.Object(),w,on.pick(Zt,Ct)):Zt;var Du=w.Array,Tu=w.Date,$u=w.Error,Fu=w.Function,Nu=w.Math,Pu=w.Object,Zu=w.RegExp,qu=w.String,Vu=w.TypeError,Ku=Du.prototype,Gu=Pu.prototype,Ju=w["__core-js_shared__"],Yu=function(){ +var t=/[^.]+$/.exec(Ju&&Ju.keys&&Ju.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Hu=Fu.prototype.toString,Qu=Gu.hasOwnProperty,Xu=0,ti=Hu.call(Pu),ni=Gu.toString,ri=Zt._,ei=Zu("^"+Hu.call(Qu).replace(ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ui=Kt?w.Buffer:N,ii=w.Symbol,oi=w.Uint8Array,fi=Pu.defineProperty,ci=C(Pu.getPrototypeOf,Pu),ai=ii?ii.iterator:N,li=Pu.create,si=Gu.propertyIsEnumerable,hi=Ku.splice,pi=ii?ii.isConcatSpreadable:N,_i=w.clearTimeout!==Zt.clearTimeout&&w.clearTimeout,vi=Tu&&Tu.now!==Zt.Date.now&&Tu.now,gi=w.setTimeout!==Zt.setTimeout&&w.setTimeout,di=Nu.ceil,yi=Nu.floor,bi=Pu.getOwnPropertySymbols,xi=ui?ui.isBuffer:N,ji=w.isFinite,wi=Ku.join,mi=C(Pu.keys,Pu),Ai=Nu.max,ki=Nu.min,Ei=Tu.now,Oi=w.parseInt,Si=Nu.random,Ii=Ku.reverse,Ri=le(w,"DataView"),zi=le(w,"Map"),Wi=le(w,"Promise"),Bi=le(w,"Set"),Li=le(w,"WeakMap"),Ci=le(Pu,"create"),Ui=le(Pu,"defineProperty"),Mi=Li&&new Li,Di={},Ti=Ie(Ri),$i=Ie(zi),Fi=Ie(Wi),Ni=Ie(Bi),Pi=Ie(Li),Zi=ii?ii.prototype:N,qi=Zi?Zi.valueOf:N,Vi=Zi?Zi.toString:N; +Ot.templateSettings={escape:X,evaluate:tt,interpolate:nt,variable:"",imports:{_:Ot}},Ot.prototype=St.prototype,Ot.prototype.constructor=Ot,zt.prototype=yn(St.prototype),zt.prototype.constructor=zt,Dt.prototype=yn(St.prototype),Dt.prototype.constructor=Dt,Tt.prototype.clear=function(){this.__data__=Ci?Ci(null):{},this.size=0},Tt.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},Tt.prototype.get=function(t){var n=this.__data__;return Ci?(t=n[t],"__lodash_hash_undefined__"===t?N:t):Qu.call(n,t)?n[t]:N; +},Tt.prototype.has=function(t){var n=this.__data__;return Ci?n[t]!==N:Qu.call(n,t)},Tt.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ci&&n===N?"__lodash_hash_undefined__":n,this},Nt.prototype.clear=function(){this.__data__=[],this.size=0},Nt.prototype.delete=function(t){var n=this.__data__;return t=an(n,t),!(0>t)&&(t==n.length-1?n.pop():hi.call(n,t,1),--this.size,true)},Nt.prototype.get=function(t){var n=this.__data__;return t=an(n,t),0>t?N:n[t][1]},Nt.prototype.has=function(t){ +return-1e?(++this.size,r.push([t,n])):r[e][1]=n,this},Pt.prototype.clear=function(){this.size=0,this.__data__={hash:new Tt,map:new(zi||Nt),string:new Tt}},Pt.prototype.delete=function(t){return t=ce(this,t).delete(t),this.size-=t?1:0,t},Pt.prototype.get=function(t){return ce(this,t).get(t)},Pt.prototype.has=function(t){return ce(this,t).has(t)},Pt.prototype.set=function(t,n){var r=ce(this,t),e=r.size;return r.set(t,n), +this.size+=r.size==e?0:1,this},qt.prototype.add=qt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},qt.prototype.has=function(t){return this.__data__.has(t)},Vt.prototype.clear=function(){this.__data__=new Nt,this.size=0},Vt.prototype.delete=function(t){var n=this.__data__;return t=n.delete(t),this.size=n.size,t},Vt.prototype.get=function(t){return this.__data__.get(t)},Vt.prototype.has=function(t){return this.__data__.has(t)},Vt.prototype.set=function(t,n){ +var r=this.__data__;if(r instanceof Nt){var e=r.__data__;if(!zi||199>e.length)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new Pt(e)}return r.set(t,n),this.size=r.size,this};var Ki=Cr(kn),Gi=Cr(En,true),Ji=Ur(),Yi=Ur(true),Hi=Mi?function(t,n){return Mi.set(t,n),t}:zu,Qi=Ui?function(t,n){return Ui(t,"toString",{configurable:true,enumerable:false,value:Ru(n),writable:true})}:zu,Xi=_i||function(t){return Zt.clearTimeout(t)},to=Bi&&1/M(new Bi([,-0]))[1]==P?function(t){return new Bi(t)}:Lu,no=Mi?function(t){ +return Mi.get(t)}:Lu,ro=bi?C(bi,Pu):Uu,eo=bi?function(t){for(var n=[];t;)s(n,ro(t)),t=ci(t);return n}:Uu;(Ri&&"[object DataView]"!=Et(new Ri(new ArrayBuffer(1)))||zi&&"[object Map]"!=Et(new zi)||Wi&&"[object Promise]"!=Et(Wi.resolve())||Bi&&"[object Set]"!=Et(new Bi)||Li&&"[object WeakMap]"!=Et(new Li))&&(Et=function(t){var n=ni.call(t);if(t=(t="[object Object]"==n?t.constructor:N)?Ie(t):N)switch(t){case Ti:return"[object DataView]";case $i:return"[object Map]";case Fi:return"[object Promise]";case Ni: +return"[object Set]";case Pi:return"[object WeakMap]"}return n});var uo=Ju?iu:Mu,io=Ee(Hi),oo=gi||function(t,n){return Zt.setTimeout(t,n)},fo=Ee(Qi),co=function(t){t=Qe(t,function(t){return 500===n.size&&n.clear(),t});var n=t.cache;return t}(function(t){t=xu(t);var n=[];return ut.test(t)&&n.push(""),t.replace(it,function(t,r,e,u){n.push(e?u.replace(vt,"$1"):r||t)}),n}),ao=cr(function(t,n){return eu(t)?xn(t,An(n,1,eu,true)):[]}),lo=cr(function(t,n){var r=Ue(n);return eu(r)&&(r=N),eu(t)?xn(t,An(n,1,eu,true),fe(r,2)):[]; +}),so=cr(function(t,n){var r=Ue(n);return eu(r)&&(r=N),eu(t)?xn(t,An(n,1,eu,true),N,r):[]}),ho=cr(function(t){var n=l(t,wr);return n.length&&n[0]===t[0]?Bn(n):[]}),po=cr(function(t){var n=Ue(t),r=l(t,wr);return n===Ue(r)?n=N:r.pop(),r.length&&r[0]===t[0]?Bn(r,fe(n,2)):[]}),_o=cr(function(t){var n=Ue(t),r=l(t,wr);return n===Ue(r)?n=N:r.pop(),r.length&&r[0]===t[0]?Bn(r,N,n):[]}),vo=cr(Me),go=ue(function(t,n){var r=t?t.length:0,e=pn(t,n);return ir(t,l(n,function(t){return ge(t,r)?+t:t}).sort(Or)),e}),yo=cr(function(t){ +return dr(An(t,1,eu,true))}),bo=cr(function(t){var n=Ue(t);return eu(n)&&(n=N),dr(An(t,1,eu,true),fe(n,2))}),xo=cr(function(t){var n=Ue(t);return eu(n)&&(n=N),dr(An(t,1,eu,true),N,n)}),jo=cr(function(t,n){return eu(t)?xn(t,n):[]}),wo=cr(function(t){return xr(f(t,eu))}),mo=cr(function(t){var n=Ue(t);return eu(n)&&(n=N),xr(f(t,eu),fe(n,2))}),Ao=cr(function(t){var n=Ue(t);return eu(n)&&(n=N),xr(f(t,eu),N,n)}),ko=cr(Te),Eo=cr(function(t){var n=t.length,n=1=n}),Ko=Du.isArray,Go=Jt?S(Jt):Un,Jo=xi||Mu,Yo=Yt?S(Yt):Mn,Ho=Ht?S(Ht):Tn,Qo=Qt?S(Qt):Nn,Xo=Xt?S(Xt):Pn,tf=tn?S(tn):Zn,nf=Hr(Gn),rf=Hr(function(t,n){return t<=n}),ef=Lr(function(t,n){if(xe(n)||ru(n))zr(n,mu(n),t);else for(var r in n)Qu.call(n,r)&&cn(t,r,n[r])}),uf=Lr(function(t,n){zr(n,Au(n),t)}),of=Lr(function(t,n,r,e){zr(n,Au(n),t,e)}),ff=Lr(function(t,n,r,e){zr(n,mu(n),t,e)}),cf=ue(pn),af=cr(function(t){return t.push(N,nn),r(of,N,t)}),lf=cr(function(t){return t.push(N,we),r(vf,N,t)}),sf=qr(function(t,n,r){ +t[n]=r},Ru(zu)),hf=qr(function(t,n,r){Qu.call(t,n)?t[n].push(r):t[n]=[r]},fe),pf=cr(Cn),_f=Lr(function(t,n,r){Qn(t,n,r)}),vf=Lr(function(t,n,r,e){Qn(t,n,r,e)}),gf=ue(function(t,n){return null==t?{}:(n=l(n,Se),nr(t,xn(In(t,Au,eo),n)))}),df=ue(function(t,n){return null==t?{}:nr(t,l(n,Se))}),yf=te(mu),bf=te(Au),xf=Tr(function(t,n,r){return n=n.toLowerCase(),t+(r?Ou(n):n)}),jf=Tr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),wf=Tr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),mf=Dr("toLowerCase"),Af=Tr(function(t,n,r){ +return t+(r?"_":"")+n.toLowerCase()}),kf=Tr(function(t,n,r){return t+(r?" ":"")+Of(n)}),Ef=Tr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Of=Dr("toUpperCase"),Sf=cr(function(t,n){try{return r(t,N,n)}catch(t){return uu(t)?t:new $u(t)}}),If=ue(function(t,n){return u(n,function(n){n=Se(n),hn(t,n,Mo(t[n],t))}),t}),Rf=Pr(),zf=Pr(true),Wf=cr(function(t,n){return function(r){return Cn(r,t,n)}}),Bf=cr(function(t,n){return function(r){return Cn(t,r,n)}}),Lf=Kr(l),Cf=Kr(o),Uf=Kr(_),Mf=Yr(),Df=Yr(true),Tf=Vr(function(t,n){ +return t+n},0),$f=Xr("ceil"),Ff=Vr(function(t,n){return t/n},1),Nf=Xr("floor"),Pf=Vr(function(t,n){return t*n},1),Zf=Xr("round"),qf=Vr(function(t,n){return t-n},0);return Ot.after=function(t,n){if(typeof n!="function")throw new Vu("Expected a function");return t=gu(t),function(){if(1>--t)return n.apply(this,arguments)}},Ot.ary=Ke,Ot.assign=ef,Ot.assignIn=uf,Ot.assignInWith=of,Ot.assignWith=ff,Ot.at=cf,Ot.before=Ge,Ot.bind=Mo,Ot.bindAll=If,Ot.bindKey=Do,Ot.castArray=function(){if(!arguments.length)return[]; +var t=arguments[0];return Ko(t)?t:[t]},Ot.chain=Fe,Ot.chunk=function(t,n,r){if(n=(r?de(t,n,r):n===N)?1:Ai(gu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,i=Du(di(r/n));en?0:n,e)):[]},Ot.dropRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:gu(n),n=e-n,lr(t,0,0>n?0:n)):[]},Ot.dropRightWhile=function(t,n){return t&&t.length?yr(t,fe(n,3),true,true):[]},Ot.dropWhile=function(t,n){return t&&t.length?yr(t,fe(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&de(t,n,r)&&(r=0,e=u),u=t.length,r=gu(r),0>r&&(r=-r>u?0:u+r),e=e===N||e>u?u:gu(e),0>e&&(e+=u),e=r>e?0:du(e);r>>0, +r?(t=xu(t))&&(typeof n=="string"||null!=n&&!Qo(n))&&(n=gr(n),!n&&Bt.test(t))?Ar($(t),0,r):t.split(n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Vu("Expected a function");return n=n===N?0:Ai(gu(n),0),cr(function(e){var u=e[n];return e=Ar(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){var n=t?t.length:0;return n?lr(t,1,n):[]},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===N?1:gu(n),lr(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:gu(n), +n=e-n,lr(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?yr(t,fe(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?yr(t,fe(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Vu("Expected a function");return cu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),He(t,n,{leading:e,maxWait:n,trailing:u})},Ot.thru=Ne,Ot.toArray=_u,Ot.toPairs=yf,Ot.toPairsIn=bf,Ot.toPath=function(t){ +return Ko(t)?l(t,Se):pu(t)?[t]:Rr(co(t))},Ot.toPlainObject=bu,Ot.transform=function(t,n,r){var e=Ko(t)||tf(t);if(n=fe(n,4),null==r)if(e||cu(t)){var i=t.constructor;r=e?Ko(t)?new i:[]:iu(i)?yn(ci(t)):{}}else r={};return(e?u:kn)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return Ke(t,1)},Ot.union=yo,Ot.unionBy=bo,Ot.unionWith=xo,Ot.uniq=function(t){return t&&t.length?dr(t):[]},Ot.uniqBy=function(t,n){return t&&t.length?dr(t,fe(n,2)):[]},Ot.uniqWith=function(t,n){return t&&t.length?dr(t,N,n):[]; +},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ye(e,r)?[e]:mr(e);r=Ae(r,e),e=Se(Ue(e)),r=!(null!=r&&Qu.call(r,e))||delete r[e]}return r},Ot.unzip=Te,Ot.unzipWith=$e,Ot.update=function(t,n,r){return null==t?t:ar(t,n,(typeof r=="function"?r:zu)(Sn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:N,null!=t&&(t=ar(t,n,(typeof r=="function"?r:zu)(Sn(t,n)),e)),t},Ot.values=Eu,Ot.valuesIn=function(t){return null==t?[]:I(t,Au(t))},Ot.without=jo,Ot.words=Iu, +Ot.wrap=function(t,n){return n=null==n?zu:n,No(n,t)},Ot.xor=wo,Ot.xorBy=mo,Ot.xorWith=Ao,Ot.zip=ko,Ot.zipObject=function(t,n){return jr(t||[],n||[],cn)},Ot.zipObjectDeep=function(t,n){return jr(t||[],n||[],ar)},Ot.zipWith=Eo,Ot.entries=yf,Ot.entriesIn=bf,Ot.extend=uf,Ot.extendWith=of,Bu(Ot,Ot),Ot.add=Tf,Ot.attempt=Sf,Ot.camelCase=xf,Ot.capitalize=Ou,Ot.ceil=$f,Ot.clamp=function(t,n,r){return r===N&&(r=n,n=N),r!==N&&(r=yu(r),r=r===r?r:0),n!==N&&(n=yu(n),n=n===n?n:0),_n(yu(t),n,r)},Ot.clone=function(t){ +return vn(t,false,true)},Ot.cloneDeep=function(t){return vn(t,true,true)},Ot.cloneDeepWith=function(t,n){return vn(t,true,true,n)},Ot.cloneWith=function(t,n){return vn(t,false,true,n)},Ot.conformsTo=function(t,n){return null==n||dn(t,n,mu(n))},Ot.deburr=Su,Ot.defaultTo=function(t,n){return null==t||t!==t?n:t},Ot.divide=Ff,Ot.endsWith=function(t,n,r){t=xu(t),n=gr(n);var e=t.length,e=r=r===N?e:_n(gu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n},Ot.eq=tu,Ot.escape=function(t){return(t=xu(t))&&Q.test(t)?t.replace(Y,en):t; +},Ot.escapeRegExp=function(t){return(t=xu(t))&&ft.test(t)?t.replace(ot,"\\$&"):t},Ot.every=function(t,n,r){var e=Ko(t)?o:jn;return r&&de(t,n,r)&&(n=N),e(t,fe(n,3))},Ot.find=Io,Ot.findIndex=We,Ot.findKey=function(t,n){return v(t,fe(n,3),kn)},Ot.findLast=Ro,Ot.findLastIndex=Be,Ot.findLastKey=function(t,n){return v(t,fe(n,3),En)},Ot.floor=Nf,Ot.forEach=Ze,Ot.forEachRight=qe,Ot.forIn=function(t,n){return null==t?t:Ji(t,fe(n,3),Au)},Ot.forInRight=function(t,n){return null==t?t:Yi(t,fe(n,3),Au)},Ot.forOwn=function(t,n){ +return t&&kn(t,fe(n,3))},Ot.forOwnRight=function(t,n){return t&&En(t,fe(n,3))},Ot.get=ju,Ot.gt=qo,Ot.gte=Vo,Ot.has=function(t,n){return null!=t&&se(t,n,zn)},Ot.hasIn=wu,Ot.head=Ce,Ot.identity=zu,Ot.includes=function(t,n,r,e){return t=ru(t)?t:Eu(t),r=r&&!e?gu(r):0,e=t.length,0>r&&(r=Ai(e+r,0)),hu(t)?r<=e&&-1r&&(r=Ai(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=vu(n),r===N?(r=n, +n=0):r=vu(r),t=yu(t),t>=ki(n,r)&&t=t},Ot.isSet=Xo,Ot.isString=hu,Ot.isSymbol=pu,Ot.isTypedArray=tf,Ot.isUndefined=function(t){return t===N; +},Ot.isWeakMap=function(t){return au(t)&&"[object WeakMap]"==Et(t)},Ot.isWeakSet=function(t){return au(t)&&"[object WeakSet]"==ni.call(t)},Ot.join=function(t,n){return t?wi.call(t,n):""},Ot.kebabCase=jf,Ot.last=Ue,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==N&&(u=gu(r),u=0>u?Ai(e+u,0):ki(u,e-1)),n===n){for(r=u+1;r--&&t[r]!==n;);t=r}else t=g(t,b,u,true);return t},Ot.lowerCase=wf,Ot.lowerFirst=mf,Ot.lt=nf,Ot.lte=rf,Ot.max=function(t){return t&&t.length?wn(t,zu,Rn):N; +},Ot.maxBy=function(t,n){return t&&t.length?wn(t,fe(n,2),Rn):N},Ot.mean=function(t){return x(t,zu)},Ot.meanBy=function(t,n){return x(t,fe(n,2))},Ot.min=function(t){return t&&t.length?wn(t,zu,Gn):N},Ot.minBy=function(t,n){return t&&t.length?wn(t,fe(n,2),Gn):N},Ot.stubArray=Uu,Ot.stubFalse=Mu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){return true},Ot.multiply=Pf,Ot.nth=function(t,n){return t&&t.length?Xn(t,gu(n)):N},Ot.noConflict=function(){return Zt._===this&&(Zt._=ri), +this},Ot.noop=Lu,Ot.now=Uo,Ot.pad=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return!n||e>=n?t:(n=(n-e)/2,Gr(yi(n),r)+t+Gr(di(n),r))},Ot.padEnd=function(t,n,r){t=xu(t);var e=(n=gu(n))?T(t):0;return n&&en){var e=t;t=n,n=e}return r||t%1||n%1?(r=Si(),ki(t+r*(n-t+$t("1e-"+((r+"").length-1))),n)):or(t,n)},Ot.reduce=function(t,n,r){var e=Ko(t)?h:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Ki)},Ot.reduceRight=function(t,n,r){var e=Ko(t)?p:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Gi)},Ot.repeat=function(t,n,r){return n=(r?de(t,n,r):n===N)?1:gu(n),fr(xu(t),n)},Ot.replace=function(){var t=arguments,n=xu(t[0]);return 3>t.length?n:n.replace(t[1],t[2]); +},Ot.result=function(t,n,r){n=ye(n,t)?[n]:mr(n);var e=-1,u=n.length;for(u||(t=N,u=1);++et||9007199254740991=i)return t;if(i=r-T(e),1>i)return e;if(r=o?Ar(o,0,i).join(""):t.slice(0,i),u===N)return r+e;if(o&&(i+=r.length-i),Qo(u)){if(t.slice(i).search(u)){var f=r;for(u.global||(u=Zu(u.source,xu(dt.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===N?i:c)}}else t.indexOf(gr(u),i)!=i&&(u=r.lastIndexOf(u),-1u.__dir__?"Right":"")}),u},Dt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Dt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:fe(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Dt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right"); +Dt.prototype[t]=function(){return this.__filtered__?new Dt(this):this[r](1)}}),Dt.prototype.compact=function(){return this.filter(zu)},Dt.prototype.find=function(t){return this.filter(t).head()},Dt.prototype.findLast=function(t){return this.reverse().find(t)},Dt.prototype.invokeMap=cr(function(t,n){return typeof t=="function"?new Dt(this):this.map(function(r){return Cn(r,t,n)})}),Dt.prototype.reject=function(t){return this.filter(Xe(fe(t)))},Dt.prototype.slice=function(t,n){t=gu(t);var r=this;return r.__filtered__&&(0n)?new Dt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)), +n!==N&&(n=gu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Dt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Dt.prototype.toArray=function(){return this.take(4294967295)},kn(Dt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],i=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Dt,a=f[0],l=c||Ko(o); +l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Dt(this),o=t.apply(o,f),o.__actions__.push({func:Ne,args:[n],thisArg:N}),new zt(o,h)):a&&c?t.apply(this,f):(o=this.thru(n),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Ku[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){ +var u=this.value();return n.apply(Ko(u)?u:[],t)}return this[r](function(r){return n.apply(Ko(r)?r:[],t)})}}),kn(Dt.prototype,function(t,n){var r=Ot[n];if(r){var e=r.name+"";(Di[e]||(Di[e]=[])).push({name:n,func:r})}}),Di[Zr(N,2).name]=[{name:"wrapper",func:N}],Dt.prototype.clone=function(){var t=new Dt(this.__wrapped__);return t.__actions__=Rr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Rr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Rr(this.__views__), +t},Dt.prototype.reverse=function(){if(this.__filtered__){var t=new Dt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Dt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Ko(n),u=0>r,i=e?n.length:0;t=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++ci||i==t&&a==t)return br(n,this.__actions__);e=[];t:for(;t--&&c=this.__values__.length;return{done:t,value:t?N:this.__values__[this.__index__++]}},Ot.prototype.plant=function(t){for(var n,r=this;r instanceof St;){var e=ze(r);e.__index__=0,e.__values__=N,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Dt?(this.__actions__.length&&(t=new Dt(this)),t=t.reverse(),t.__actions__.push({func:Ne,args:[De],thisArg:N}),new zt(t,this.__chain__)):this.thru(De); +},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return br(this.__wrapped__,this.__actions__)},Ot.prototype.first=Ot.prototype.head,ai&&(Ot.prototype[ai]=Pe),Ot}var N,P=1/0,Z=NaN,q=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],V=/\b__p\+='';/g,K=/\b(__p\+=)''\+/g,G=/(__e\(.*?\)|\b__t\))\+'';/g,J=/&(?:amp|lt|gt|quot|#39|#96);/g,Y=/[&<>"'`]/g,H=RegExp(J.source),Q=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,ut=/^\./,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ot=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(ot.source),ct=/^\s+|\s+$/g,at=/^\s+/,lt=/\s+$/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ht=/\{\n\/\* \[wrapped with (.+)\] \*/,pt=/,? & /,_t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vt=/\\(\\)?/g,gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,bt=/^0b[01]+$/i,xt=/^\[object .+?Constructor\]$/,jt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,At=/($^)/,kt=/['\n\r\u2028\u2029\\]/g,Et="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+Et,St="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",It=RegExp("['\u2019]","g"),Rt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),zt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+St+Et,"g"),Wt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Ot].join("|"),"g"),Bt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Lt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Ut={}; +Ut["[object Float32Array]"]=Ut["[object Float64Array]"]=Ut["[object Int8Array]"]=Ut["[object Int16Array]"]=Ut["[object Int32Array]"]=Ut["[object Uint8Array]"]=Ut["[object Uint8ClampedArray]"]=Ut["[object Uint16Array]"]=Ut["[object Uint32Array]"]=true,Ut["[object Arguments]"]=Ut["[object Array]"]=Ut["[object ArrayBuffer]"]=Ut["[object Boolean]"]=Ut["[object DataView]"]=Ut["[object Date]"]=Ut["[object Error]"]=Ut["[object Function]"]=Ut["[object Map]"]=Ut["[object Number]"]=Ut["[object Object]"]=Ut["[object RegExp]"]=Ut["[object Set]"]=Ut["[object String]"]=Ut["[object WeakMap]"]=false; +var Mt={};Mt["[object Arguments]"]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object DataView]"]=Mt["[object Boolean]"]=Mt["[object Date]"]=Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt["[object Object]"]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object Symbol]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=true, +Mt["[object Error]"]=Mt["[object Function]"]=Mt["[object WeakMap]"]=false;var Dt,Tt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=parseFloat,Ft=parseInt,Nt=typeof global=="object"&&global&&global.Object===Object&&global,Pt=typeof self=="object"&&self&&self.Object===Object&&self,Zt=Nt||Pt||Function("return this")(),qt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vt=qt&&typeof module=="object"&&module&&!module.nodeType&&module,Kt=Vt&&Vt.exports===qt,Gt=Kt&&Nt.g; +t:{try{Dt=Gt&&Gt.f("util");break t}catch(t){}Dt=void 0}var Jt=Dt&&Dt.isArrayBuffer,Yt=Dt&&Dt.isDate,Ht=Dt&&Dt.isMap,Qt=Dt&&Dt.isRegExp,Xt=Dt&&Dt.isSet,tn=Dt&&Dt.isTypedArray,nn=j("length"),rn=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I", "\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C", "\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i", "\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S", "\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n", -"\u017f":"ss"}),on=w({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),fn=w({"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"}),cn=N();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Vt._=cn, define(function(){return cn})):Gt?((Gt.exports=cn)._=cn,Kt._=cn):Vt._=cn}).call(this); \ No newline at end of file +"\u017f":"s"}),en=w({"&":"&","<":"<",">":">",'"':""","'":"'"}),un=w({"&":"&","<":"<",">":">",""":'"',"'":"'"}),on=F();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zt._=on, define(function(){return on})):Vt?((Vt.exports=on)._=on,qt._=on):Zt._=on}).call(this); \ No newline at end of file diff --git a/dist/mapping.fp.js b/dist/mapping.fp.js index 9f4ad2c3f2..8ff1cc3d6c 100644 --- a/dist/mapping.fp.js +++ b/dist/mapping.fp.js @@ -164,9 +164,10 @@ return /******/ (function(modules) { // webpackBootstrap 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', - 'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace', - 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', - 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith' + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' ], '4': [ 'fill', 'setWith', 'updateWith' @@ -245,6 +246,8 @@ return /******/ (function(modules) { // webpackBootstrap 'padCharsStart': [2, 1, 0], 'pullAllBy': [2, 1, 0], 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], @@ -366,6 +369,8 @@ return /******/ (function(modules) { // webpackBootstrap 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', 'restFrom': 'rest', 'spreadFrom': 'spread', 'trimChars': 'trim', diff --git a/doc/README.md b/doc/README.md index 3e06a056c3..1c079bf0e3 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# lodash v4.15.0 +# lodash v4.16.0 @@ -124,7 +124,7 @@ * `_.bindKey` * `_.curry` * `_.curryRight` -* `_.debounce` +* `_.debounce` * `_.defer` * `_.delay` * `_.flip` @@ -137,7 +137,7 @@ * `_.rearg` * `_.rest` * `_.spread` -* `_.throttle` +* `_.throttle` * `_.unary` * `_.wrap` @@ -330,13 +330,13 @@ * `_.split` * `_.startCase` * `_.startsWith` -* `_.template` +* `_.template` * `_.toLower` * `_.toUpper` * `_.trim` * `_.trimEnd` * `_.trimStart` -* `_.truncate` +* `_.truncate` * `_.unescape` * `_.upperCase` * `_.upperFirst` @@ -361,7 +361,7 @@ * `_.matchesProperty` * `_.method` * `_.methodOf` -* `_.mixin` +* `_.mixin` * `_.noConflict` * `_.noop` * `_.nthArg` @@ -415,7 +415,7 @@

_.chunk(array, [size=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6479 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6670 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] Creates an array of elements split into groups the length of `size`. If `array` can't be split evenly, the final chunk will be the remaining @@ -445,7 +445,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3);

_.compact(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6514 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6705 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are falsey. @@ -470,7 +470,7 @@ _.compact([0, 1, false, 2, '', 3]);

_.concat(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6551 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6742 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] Creates a new array concatenating `array` with any additional arrays and/or values. @@ -502,12 +502,12 @@ console.log(array);

_.difference(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6586 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6778 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] Creates an array of `array` values not included in the other given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) -for equality comparisons. The order of result values is determined by the -order they occur in the first array. +for equality comparisons. The order and references of result values are +determined by the first array.

**Note:** Unlike `_.pullAll`, this method returns a new array. @@ -533,12 +533,13 @@ _.difference([2, 1], [2, 3]);

_.differenceBy(array, [values], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6810 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion -by which they're compared. Result values are chosen from the first array. -The iteratee is invoked with one argument: *(value)*. +by which they're compared. The order and references of result values are +determined by the first array. The iteratee is invoked with one argument:
+*(value)*.

**Note:** Unlike `_.pullAllBy`, this method returns a new array. @@ -569,12 +570,12 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');

_.differenceWith(array, [values], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6650 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6843 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `comparator` -which is invoked to compare elements of `array` to `values`. Result values -are chosen from the first array. The comparator is invoked with two arguments:
-*(arrVal, othVal)*. +which is invoked to compare elements of `array` to `values`. The order and +references of result values are determined by the first array. The comparator +is invoked with two arguments: *(arrVal, othVal)*.

**Note:** Unlike `_.pullAllWith`, this method returns a new array. @@ -603,7 +604,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);

_.drop(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6685 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6878 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the beginning. @@ -637,7 +638,7 @@ _.drop([1, 2, 3], 0);

_.dropRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6719 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6912 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the end. @@ -671,7 +672,7 @@ _.dropRight([1, 2, 3], 0);

_.dropRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6764 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6957 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until `predicate` returns falsey. The predicate is @@ -716,7 +717,7 @@ _.dropRightWhile(users, 'active');

_.dropWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6806 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L6999 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the beginning. Elements are dropped until `predicate` returns falsey. The predicate is @@ -761,7 +762,7 @@ _.dropWhile(users, 'active');

_.fill(array, value, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6841 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] Fills elements of `array` with `value` from `start` up to, but not including, `end`. @@ -801,7 +802,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3);

_.findIndex(array, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6889 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7082 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the index of the first element `predicate` returns truthy for instead of the element itself. @@ -846,7 +847,7 @@ _.findIndex(users, 'active');

_.findLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6937 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7130 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] This method is like `_.findIndex` except that it iterates over elements of `collection` from right to left. @@ -891,7 +892,7 @@ _.findLastIndex(users, 'active');

_.flatten(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6966 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7159 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] Flattens `array` a single level deep. @@ -915,7 +916,7 @@ _.flatten([1, [2, [3, [4]], 5]]);

_.flattenDeep(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L6985 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7178 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] Recursively flattens `array`. @@ -939,7 +940,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]);

_.flattenDepth(array, [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7010 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7203 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] Recursively flatten `array` up to `depth` times. @@ -969,7 +970,7 @@ _.flattenDepth(array, 2);

_.fromPairs(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7227 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] The inverse of `_.toPairs`; this method returns an object composed from key-value `pairs`. @@ -994,7 +995,7 @@ _.fromPairs([['a', 1], ['b', 2]]);

_.head(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7257 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] Gets the first element of `array`. @@ -1024,7 +1025,7 @@ _.head([]);

_.indexOf(array, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7091 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] Gets the index at which the first occurrence of `value` is found in `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1057,7 +1058,7 @@ _.indexOf([1, 2, 1, 2], 2, 2);

_.initial(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7117 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] Gets all but the last element of `array`. @@ -1081,12 +1082,12 @@ _.initial([1, 2, 3]);

_.intersection([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7139 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] Creates an array of unique values that are included in all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) -for equality comparisons. The order of result values is determined by the -order they occur in the first array. +for equality comparisons. The order and references of result values are +determined by the first array. #### Since 0.1.0 @@ -1108,12 +1109,13 @@ _.intersection([2, 1], [2, 3]);

_.intersectionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7168 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7362 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion -by which they're compared. Result values are chosen from the first array. -The iteratee is invoked with one argument: *(value)*. +by which they're compared. The order and references of result values are +determined by the first array. The iteratee is invoked with one argument:
+*(value)*. #### Since 4.0.0 @@ -1140,12 +1142,12 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.intersectionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7203 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7397 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `comparator` -which is invoked to compare elements of `arrays`. Result values are chosen -from the first array. The comparator is invoked with two arguments:
-*(arrVal, othVal)*. +which is invoked to compare elements of `arrays`. The order and references +of result values are determined by the first array. The comparator is +invoked with two arguments: *(arrVal, othVal)*. #### Since 4.0.0 @@ -1171,7 +1173,7 @@ _.intersectionWith(objects, others, _.isEqual);

_.join(array, [separator=','])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7232 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7426 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] Converts all elements in `array` into a string separated by `separator`. @@ -1196,7 +1198,7 @@ _.join(['a', 'b', 'c'], '~');

_.last(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7250 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7444 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] Gets the last element of `array`. @@ -1220,7 +1222,7 @@ _.last([1, 2, 3]);

_.lastIndexOf(array, value, [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7470 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it iterates over elements of `array` from right to left. @@ -1251,7 +1253,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2);

_.nth(array, [n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7322 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7506 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned. @@ -1282,7 +1284,7 @@ _.nth(array, -2);

_.pull(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7349 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7533 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] Removes all given values from `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1316,7 +1318,7 @@ console.log(array);

_.pullAll(array, values)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7371 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] This method is like `_.pull` except that it accepts an array of values to remove.
@@ -1347,7 +1349,7 @@ console.log(array);

_.pullAllBy(array, values, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7401 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -1381,7 +1383,7 @@ console.log(array);

_.pullAllWith(array, values, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7614 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The comparator is @@ -1415,7 +1417,7 @@ console.log(array);

_.pullAt(array, [indexes])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7460 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7644 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] Removes elements from `array` corresponding to `indexes` and returns an array of removed elements. @@ -1450,7 +1452,7 @@ console.log(pulled);

_.remove(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7502 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7684 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] Removes all elements from `array` that `predicate` returns truthy for and returns an array of the removed elements. The predicate is invoked @@ -1489,7 +1491,7 @@ console.log(evens);

_.reverse(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7546 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on. @@ -1523,7 +1525,7 @@ console.log(array);

_.slice(array, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7566 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7748 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] Creates a slice of `array` from `start` up to, but not including, `end`.
@@ -1549,7 +1551,7 @@ returned.

_.sortedIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7599 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7781 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] Uses a binary search to determine the lowest index at which `value` should be inserted into `array` in order to maintain its sort order. @@ -1575,7 +1577,7 @@ _.sortedIndex([30, 50], 40);

_.sortedIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7629 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7811 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1609,7 +1611,7 @@ _.sortedIndexBy(objects, { 'x': 4 }, 'x');

_.sortedIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7649 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7831 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it performs a binary search on a sorted `array`. @@ -1635,7 +1637,7 @@ _.sortedIndexOf([4, 5, 5, 5, 6], 5);

_.sortedLastIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7860 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it returns the highest index at which `value` should be inserted into `array` in order to @@ -1662,7 +1664,7 @@ _.sortedLastIndex([4, 5, 5, 5, 6], 5);

_.sortedLastIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7708 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7890 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedLastIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1696,7 +1698,7 @@ _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');

_.sortedLastIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] This method is like `_.lastIndexOf` except that it performs a binary search on a sorted `array`. @@ -1722,7 +1724,7 @@ _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);

_.sortedUniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7754 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7936 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it's designed and optimized for sorted arrays. @@ -1747,7 +1749,7 @@ _.sortedUniq([1, 1, 2]);

_.sortedUniqBy(array, [iteratee])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7776 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7958 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays. @@ -1773,7 +1775,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);

_.tail(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7796 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L7978 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] Gets all but the first element of `array`. @@ -1797,7 +1799,7 @@ _.tail([1, 2, 3]);

_.take(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7826 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8008 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the beginning. @@ -1831,7 +1833,7 @@ _.take([1, 2, 3], 0);

_.takeRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7859 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8041 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the end. @@ -1865,7 +1867,7 @@ _.takeRight([1, 2, 3], 0);

_.takeRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7905 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8087 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the end. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -1910,7 +1912,7 @@ _.takeRightWhile(users, 'active');

_.takeWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7947 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8129 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the beginning. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -1955,7 +1957,7 @@ _.takeWhile(users, 'active');

_.union([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7969 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8151 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] Creates an array of unique values, in order, from all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1981,7 +1983,7 @@ _.union([2], [1, 2]);

_.unionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L7997 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8179 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2014,7 +2016,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.unionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8026 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8208 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `comparator` which is invoked to compare elements of `arrays`. Result values are chosen from @@ -2045,12 +2047,13 @@ _.unionWith(objects, others, _.isEqual);

_.uniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8051 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8234 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] Creates a duplicate-free version of an array, using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) -for equality comparisons, in which only the first occurrence of each -element is kept. +for equality comparisons, in which only the first occurrence of each element +is kept. The order of result values is determined by the order they occur +in the array. #### Since 0.1.0 @@ -2072,11 +2075,13 @@ _.uniq([2, 1, 2]);

_.uniqBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8079 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8264 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which -uniqueness is computed. The iteratee is invoked with one argument: *(value)*. +uniqueness is computed. The order of result values is determined by the +order they occur in the array. The iteratee is invoked with one argument:
+*(value)*. #### Since 4.0.0 @@ -2103,11 +2108,12 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');

_.uniqWith(array, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8290 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `comparator` which -is invoked to compare elements of `array`. The comparator is invoked with -two arguments: *(arrVal, othVal)*. +is invoked to compare elements of `array`. The order of result values is +determined by the order they occur in the array.The comparator is invoked +with two arguments: *(arrVal, othVal)*. #### Since 4.0.0 @@ -2132,7 +2138,7 @@ _.uniqWith(objects, _.isEqual);

_.unzip(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8129 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8315 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] This method is like `_.zip` except that it accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip @@ -2161,7 +2167,7 @@ _.unzip(zipped);

_.unzipWith(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8166 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8352 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] This method is like `_.unzip` except that it accepts `iteratee` to specify how regrouped values should be combined. The iteratee is invoked with the @@ -2191,7 +2197,7 @@ _.unzipWith(zipped, _.add);

_.without(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8199 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8385 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] Creates an array excluding all given values using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2221,7 +2227,7 @@ _.without([2, 1, 2, 3], 1, 2);

_.xor([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8223 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8409 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) @@ -2248,12 +2254,13 @@ _.xor([2, 1], [2, 3]);

_.xorBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8250 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8437 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by -which by which they're compared. The iteratee is invoked with one argument:
-*(value)*. +which by which they're compared. The order of result values is determined +by the order they occur in the arrays. The iteratee is invoked with one +argument: *(value)*. #### Since 4.0.0 @@ -2280,11 +2287,12 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.xorWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8278 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8466 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `comparator` which is -invoked to compare elements of `arrays`. The comparator is invoked with -two arguments: *(arrVal, othVal)*. +invoked to compare elements of `arrays`. The order of result values is +determined by the order they occur in the arrays. The comparator is invoked +with two arguments: *(arrVal, othVal)*. #### Since 4.0.0 @@ -2310,7 +2318,7 @@ _.xorWith(objects, others, _.isEqual);

_.zip([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8302 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8490 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the @@ -2336,7 +2344,7 @@ _.zip(['a', 'b'], [1, 2], [true, false]);

_.zipObject([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8320 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8508 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] This method is like `_.fromPairs` except that it accepts two arrays, one of property identifiers and one of corresponding values. @@ -2362,7 +2370,7 @@ _.zipObject(['a', 'b'], [1, 2]);

_.zipObjectDeep([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8339 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8527 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] This method is like `_.zipObject` except that it supports property paths. @@ -2387,7 +2395,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);

_.zipWith([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8362 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] This method is like `_.zip` except that it accepts `iteratee` to specify how grouped values should be combined. The iteratee is invoked with the @@ -2422,7 +2430,7 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {

_.countBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8743 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8930 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -2454,7 +2462,7 @@ _.countBy(['one', 'two', 'three'], 'length');

_.every(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8789 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8980 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **all** elements of `collection`. Iteration is stopped once `predicate` returns falsey. The predicate is @@ -2504,7 +2512,7 @@ _.every(users, 'active');

_.filter(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8835 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9026 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning an array of all elements `predicate` returns truthy for. The predicate is invoked with three @@ -2551,7 +2559,7 @@ _.filter(users, 'active');

_.find(collection, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8877 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9068 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning the first element `predicate` returns truthy for. The predicate is invoked with three @@ -2597,7 +2605,7 @@ _.find(users, 'active');

_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8899 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] This method is like `_.find` except that it iterates over elements of `collection` from right to left. @@ -2626,7 +2634,7 @@ _.findLast([1, 2, 3, 4], function(n) {

_.flatMap(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9114 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] Creates a flattened array of values by running each element in `collection` thru `iteratee` and flattening the mapped results. The iteratee is invoked @@ -2657,7 +2665,7 @@ _.flatMap([1, 2], duplicate);

_.flatMapDeep(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8948 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9139 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results. @@ -2687,7 +2695,7 @@ _.flatMapDeep([1, 2], duplicate);

_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8974 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9165 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results up to `depth` times. @@ -2718,7 +2726,7 @@ _.flatMapDepth([1, 2], duplicate, 2);

_.forEach(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9009 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9200 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] Iterates over elements of `collection` and invokes `iteratee` for each element. The iteratee is invoked with three arguments: *(value, index|key, collection)*. @@ -2743,7 +2751,7 @@ or `_.forOwn` for object iteration. #### Example ```js -_([1, 2]).forEach(function(value) { +_.forEach([1, 2], function(value) { console.log(value); }); // => Logs `1` then `2`. @@ -2760,7 +2768,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {

_.forEachRight(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9225 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] This method is like `_.forEach` except that it iterates over elements of `collection` from right to left. @@ -2791,7 +2799,7 @@ _.forEachRight([1, 2], function(value) {

_.groupBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9063 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9254 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The order of grouped values @@ -2824,7 +2832,7 @@ _.groupBy(['one', 'two', 'three'], 'length');

_.includes(collection, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9101 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9292 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] Checks if `value` is in `collection`. If `collection` is a string, it's checked for a substring of `value`, otherwise @@ -2863,7 +2871,7 @@ _.includes('abcd', 'bc');

_.invokeMap(collection, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] Invokes the method at `path` of each element in `collection`, returning an array of the results of each invoked method. Any additional arguments @@ -2895,7 +2903,7 @@ _.invokeMap([123, 456], String.prototype.split, '');

_.keyBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9179 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9370 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -2933,7 +2941,7 @@ _.keyBy(array, 'dir');

_.map(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9225 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9416 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] Creates an array of values by running each element in `collection` thru `iteratee`. The iteratee is invoked with three arguments:
@@ -2987,7 +2995,7 @@ _.map(users, 'user');

_.orderBy(collection, [iteratees=[_.identity]], [orders])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9450 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] This method is like `_.sortBy` except that it allows specifying the sort orders of the iteratees to sort by. If `orders` is unspecified, all values @@ -3024,7 +3032,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']);

_.partition(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9309 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9500 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] Creates an array of elements split into two groups, the first of which contains elements `predicate` returns truthy for, the second of which @@ -3070,7 +3078,7 @@ _.partition(users, 'active');

_.reduce(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9350 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9541 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] Reduces `collection` to a value which is the accumulated result of running each element in `collection` thru `iteratee`, where each successive @@ -3118,7 +3126,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.reduceRight(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9379 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9570 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] This method is like `_.reduce` except that it iterates over elements of `collection` from right to left. @@ -3149,7 +3157,7 @@ _.reduceRight(array, function(flattened, other) {

_.reject(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9420 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9611 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] The opposite of `_.filter`; this method returns the elements of `collection` that `predicate` does **not** return truthy for. @@ -3192,7 +3200,7 @@ _.reject(users, 'active');

_.sample(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9439 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9630 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] Gets a random element from `collection`. @@ -3216,7 +3224,7 @@ _.sample([1, 2, 3, 4]);

_.sampleSize(collection, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9466 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9654 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] Gets `n` random elements at unique keys from `collection` up to the size of `collection`. @@ -3245,7 +3253,7 @@ _.sampleSize([1, 2, 3], 4);

_.shuffle(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9503 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] Creates an array of shuffled values, using a version of the [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). @@ -3270,7 +3278,7 @@ _.shuffle([1, 2, 3, 4]);

_.size(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9706 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] Gets the size of `collection` by returning its length for array-like values or the number of own enumerable string keyed properties for objects. @@ -3301,7 +3309,7 @@ _.size('pebbles');

_.some(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **any** element of `collection`. Iteration is stopped once `predicate` returns truthy. The predicate is @@ -3345,7 +3353,7 @@ _.some(users, 'active');

_.sortBy(collection, [iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9620 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9793 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] Creates an array of elements, sorted in ascending order by the results of running each element in a collection thru each iteratee. This method @@ -3370,16 +3378,11 @@ var users = [ { 'user': 'barney', 'age': 34 } ]; -_.sortBy(users, function(o) { return o.user; }); +_.sortBy(users, [function(o) { return o.user; }]); // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] _.sortBy(users, ['user', 'age']); // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - -_.sortBy(users, 'user', function(o) { - return Math.floor(o.age / 10); -}); -// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] ``` --- @@ -3394,7 +3397,7 @@ _.sortBy(users, 'user', function(o) {

_.now()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9651 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9824 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*. @@ -3424,7 +3427,7 @@ _.defer(function(stamp) {

_.after(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9681 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9854 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] The opposite of `_.before`; this method creates a function that invokes `func` once it's called `n` or more times. @@ -3458,7 +3461,7 @@ _.forEach(saves, function(type) {

_.ary(func, [n=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9710 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9883 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] Creates a function that invokes `func`, with up to `n` arguments, ignoring any additional arguments. @@ -3484,7 +3487,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1));

_.before(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9733 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9906 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] Creates a function that invokes `func`, with the `this` binding and arguments of the created function, while it's called less than `n` times. Subsequent @@ -3511,7 +3514,7 @@ jQuery(element).on('click', _.before(5, addContactToList));

_.bind(func, thisArg, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9785 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L9958 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of `thisArg` and `partials` prepended to the arguments it receives. @@ -3558,7 +3561,7 @@ bound('hi');

_.bindKey(object, key, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9839 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10012 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `object[key]` with `partials` prepended to the arguments it receives. @@ -3615,7 +3618,7 @@ bound('hi');

_.curry(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9889 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have @@ -3667,7 +3670,7 @@ curried(1)(_, 3)(2);

_.curryRight(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9934 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10107 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] This method is like `_.curry` except that arguments are applied to `func` in the manner of `_.partialRight` instead of `_.partial`. @@ -3715,8 +3718,8 @@ curried(3)(1, _)(2); -

_.debounce(func, [wait=0], [options={}], [options.leading=false], [options.maxWait], [options.trailing=true])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L9995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] +

_.debounce(func, [wait=0], [options={}])

+[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10168 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] Creates a debounced function that delays invoking `func` until after `wait` milliseconds have elapsed since the last time the debounced function was @@ -3780,7 +3783,7 @@ jQuery(window).on('popstate', debounced.cancel);

_.defer(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10135 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to `func` when it's invoked. @@ -3799,7 +3802,7 @@ additional arguments are provided to `func` when it's invoked. _.defer(function(text) { console.log(text); }, 'deferred'); -// => Logs 'deferred' after one or more milliseconds. +// => Logs 'deferred' after one millisecond. ``` --- @@ -3808,7 +3811,7 @@ _.defer(function(text) {

_.delay(func, wait, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10158 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] Invokes `func` after `wait` milliseconds. Any additional arguments are provided to `func` when it's invoked. @@ -3837,7 +3840,7 @@ _.delay(function(text) {

_.flip(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10180 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10353 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments reversed. @@ -3865,7 +3868,7 @@ flipped('a', 'b', 'c', 'd');

_.memoize(func, [resolver])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10228 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10401 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] Creates a function that memoizes the result of `func`. If `resolver` is provided, it determines the cache key for storing the result based on the @@ -3920,7 +3923,7 @@ _.memoize.Cache = WeakMap;

_.negate(predicate)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10444 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] Creates a function that negates the result of the predicate `func`. The `func` predicate is invoked with the `this` binding and arguments of the @@ -3950,7 +3953,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));

_.once(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10305 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10478 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] Creates a function that is restricted to invoking `func` once. Repeat calls to the function return the value of the first invocation. The `func` is @@ -3978,7 +3981,7 @@ initialize();

_.overArgs(func, [transforms=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10340 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10513 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with its arguments transformed. @@ -4018,7 +4021,7 @@ func(10, 5);

_.partial(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10390 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10563 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with `partials` prepended to the arguments it receives. This method is like `_.bind` except it does **not** @@ -4063,7 +4066,7 @@ greetFred('hi');

_.partialRight(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10427 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10600 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] This method is like `_.partial` except that partially applied arguments are appended to the arguments it receives. @@ -4107,7 +4110,7 @@ sayHelloTo('fred');

_.rearg(func, indexes)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10454 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10627 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments arranged according to the specified `indexes` where the argument value at the first index is @@ -4139,7 +4142,7 @@ rearged('b', 'c', 'a')

_.rest(func, [start=func.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10656 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the created function and arguments from `start` and beyond provided as @@ -4175,7 +4178,7 @@ say('hello', 'fred', 'barney', 'pebbles');

_.spread(func, [start=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10525 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10698 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the create function and an array of arguments much like @@ -4219,8 +4222,8 @@ numbers.then(_.spread(function(x, y) { -

_.throttle(func, [wait=0], [options={}], [options.leading=true], [options.trailing=true])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] +

_.throttle(func, [wait=0], [options={}])

+[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10758 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] Creates a throttled function that only invokes `func` at most once per every `wait` milliseconds. The throttled function comes with a `cancel` @@ -4275,7 +4278,7 @@ jQuery(window).on('popstate', throttled.cancel);

_.unary(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10618 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10791 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] Creates a function that accepts up to one argument, ignoring any additional arguments. @@ -4300,7 +4303,7 @@ _.map(['6', '8', '10'], _.unary(parseInt));

_.wrap(value, [wrapper=identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10644 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] Creates a function that provides `value` to `wrapper` as its first argument. Any additional arguments provided to the function are appended @@ -4338,7 +4341,7 @@ p('fred, barney, & pebbles');

_.castArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10684 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10857 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] Casts `value` as an array if it's not one. @@ -4381,7 +4384,7 @@ console.log(_.castArray(array) === array);

_.clone(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10718 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10891 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] Creates a shallow clone of `value`.
@@ -4417,7 +4420,7 @@ console.log(shallow[0] === objects[0]);

_.cloneDeep(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10775 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10948 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it recursively clones `value`. @@ -4444,7 +4447,7 @@ console.log(deep[0] === objects[0]);

_.cloneDeepWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10807 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10980 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] This method is like `_.cloneWith` except that it recursively clones `value`. @@ -4481,7 +4484,7 @@ console.log(el.childNodes.length);

_.cloneWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10753 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L10926 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it accepts `customizer` which is invoked to produce the cloned value. If `customizer` returns `undefined`, @@ -4521,7 +4524,7 @@ console.log(el.childNodes.length);

_.conformsTo(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10835 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11008 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] Checks if `object` conforms to `source` by invoking the predicate properties of `source` with the corresponding property values of `object`. @@ -4556,7 +4559,7 @@ _.conformsTo(object, { 'b': function(n) { return n > 2; } });

_.eq(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10871 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -4598,7 +4601,7 @@ _.eq(NaN, NaN);

_.gt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10898 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11071 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] Checks if `value` is greater than `other`. @@ -4629,7 +4632,7 @@ _.gt(1, 3);

_.gte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11096 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] Checks if `value` is greater than or equal to `other`. @@ -4660,7 +4663,7 @@ _.gte(1, 3);

_.isArguments(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10945 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11118 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] Checks if `value` is likely an `arguments` object. @@ -4687,7 +4690,7 @@ _.isArguments([1, 2, 3]);

_.isArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10974 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11147 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `Array` object. @@ -4720,7 +4723,7 @@ _.isArray(_.noop);

_.isArrayBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L10993 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11166 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `ArrayBuffer` object. @@ -4747,7 +4750,7 @@ _.isArrayBuffer(new Array(2));

_.isArrayLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11020 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11193 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] Checks if `value` is array-like. A value is considered array-like if it's not a function and has a `value.length` that's an integer greater than or @@ -4782,7 +4785,7 @@ _.isArrayLike(_.noop);

_.isArrayLikeObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11049 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11222 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] This method is like `_.isArrayLike` except that it also checks if `value` is an object. @@ -4816,7 +4819,7 @@ _.isArrayLikeObject(_.noop);

_.isBoolean(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11070 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11243 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] Checks if `value` is classified as a boolean primitive or object. @@ -4843,7 +4846,7 @@ _.isBoolean(null);

_.isBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11265 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] Checks if `value` is a buffer. @@ -4870,7 +4873,7 @@ _.isBuffer(new Uint8Array(2));

_.isDate(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11111 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Date` object. @@ -4897,7 +4900,7 @@ _.isDate('Mon April 23 2012');

_.isElement(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11130 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11303 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] Checks if `value` is likely a DOM element. @@ -4924,7 +4927,7 @@ _.isElement('');

_.isEmpty(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11167 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11340 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] Checks if `value` is an empty object, collection, map, or set.
@@ -4969,7 +4972,7 @@ _.isEmpty({ 'a': 1 });

_.isEqual(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11216 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11389 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] Performs a deep comparison between two values to determine if they are equivalent. @@ -5008,7 +5011,7 @@ object === other;

_.isEqualWith(value, other, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11252 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11425 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] This method is like `_.isEqual` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5050,7 +5053,7 @@ _.isEqualWith(array, other, customizer);

_.isError(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11449 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, or `URIError` object. @@ -5078,7 +5081,7 @@ _.isError(Error);

_.isFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] Checks if `value` is a finite primitive number.
@@ -5115,7 +5118,7 @@ _.isFinite('3');

_.isFunction(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11504 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Function` object. @@ -5142,7 +5145,7 @@ _.isFunction(/abc/);

_.isInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11364 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11537 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] Checks if `value` is an integer.
@@ -5179,7 +5182,7 @@ _.isInteger('3');

_.isLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11394 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11567 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] Checks if `value` is a valid array-like length.
@@ -5216,7 +5219,7 @@ _.isLength('3');

_.isMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11474 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11647 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Map` object. @@ -5243,7 +5246,7 @@ _.isMap(new WeakMap);

_.isMatch(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11504 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] Performs a partial deep comparison between `object` and `source` to determine if `object` contains equivalent property values. @@ -5283,7 +5286,7 @@ _.isMatch(object, { 'b': 1 });

_.isMatchWith(object, source, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11540 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11713 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] This method is like `_.isMatch` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5325,7 +5328,7 @@ _.isMatchWith(object, source, customizer);

_.isNaN(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11573 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11746 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] Checks if `value` is `NaN`.
@@ -5364,7 +5367,7 @@ _.isNaN(undefined);

_.isNative(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11606 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11779 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] Checks if `value` is a pristine native function.
@@ -5400,7 +5403,7 @@ _.isNative(_);

_.isNil(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11654 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11827 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] Checks if `value` is `null` or `undefined`. @@ -5430,7 +5433,7 @@ _.isNil(NaN);

_.isNull(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11630 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11803 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] Checks if `value` is `null`. @@ -5457,7 +5460,7 @@ _.isNull(void 0);

_.isNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11684 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11857 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Number` primitive or object.
@@ -5494,7 +5497,7 @@ _.isNumber('3');

_.isObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11424 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11597 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] Checks if `value` is the [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -5529,7 +5532,7 @@ _.isObject(null);

_.isObjectLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11453 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11626 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object". @@ -5563,7 +5566,7 @@ _.isObjectLike(null);

_.isPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11890 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] Checks if `value` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -5601,7 +5604,7 @@ _.isPlainObject(Object.create(null));

_.isRegExp(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11748 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11920 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `RegExp` object. @@ -5628,7 +5631,7 @@ _.isRegExp('/abc/');

_.isSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11777 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11949 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 double precision number which isn't the result of a rounded unsafe integer. @@ -5666,7 +5669,7 @@ _.isSafeInteger('3');

_.isSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11970 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Set` object. @@ -5693,7 +5696,7 @@ _.isSet(new WeakSet);

_.isString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L11989 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `String` primitive or object. @@ -5720,7 +5723,7 @@ _.isString(1);

_.isSymbol(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11839 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12011 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Symbol` primitive or object. @@ -5747,7 +5750,7 @@ _.isSymbol('abc');

_.isTypedArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12033 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as a typed array. @@ -5774,7 +5777,7 @@ _.isTypedArray([]);

_.isUndefined(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11880 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12052 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] Checks if `value` is `undefined`. @@ -5801,7 +5804,7 @@ _.isUndefined(null);

_.isWeakMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11901 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakMap` object. @@ -5828,7 +5831,7 @@ _.isWeakMap(new Map);

_.isWeakSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11922 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12094 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakSet` object. @@ -5855,7 +5858,7 @@ _.isWeakSet(new Set);

_.lt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11949 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12121 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] Checks if `value` is less than `other`. @@ -5886,7 +5889,7 @@ _.lt(3, 1);

_.lte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L11974 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12146 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] Checks if `value` is less than or equal to `other`. @@ -5917,7 +5920,7 @@ _.lte(3, 1);

_.toArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12173 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] Converts `value` to an array. @@ -5950,7 +5953,7 @@ _.toArray(null);

_.toFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12040 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12212 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] Converts `value` to a finite number. @@ -5983,7 +5986,7 @@ _.toFinite('3.2');

_.toInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12078 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12250 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] Converts `value` to an integer.
@@ -6020,7 +6023,7 @@ _.toInteger('3.2');

_.toLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12112 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] Converts `value` to an integer suitable for use as the length of an array-like object. @@ -6058,7 +6061,7 @@ _.toLength('3.2');

_.toNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12139 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12311 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] Converts `value` to a number. @@ -6091,7 +6094,7 @@ _.toNumber('3.2');

_.toPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12356 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] Converts `value` to a plain object flattening inherited enumerable string keyed properties of `value` to own properties of the plain object. @@ -6125,7 +6128,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo));

_.toSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12212 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] Converts `value` to a safe integer. A safe integer can be compared and represented correctly. @@ -6159,7 +6162,7 @@ _.toSafeInteger('3.2');

_.toString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12237 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12409 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] Converts `value` to a string. An empty string is returned for `null` and `undefined` values. The sign of `-0` is preserved. @@ -6196,7 +6199,7 @@ _.toString([1, 2, 3]);

_.add(augend, addend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15813 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15975 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] Adds two numbers. @@ -6221,7 +6224,7 @@ _.add(6, 4);

_.ceil(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15838 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16000 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] Computes `number` rounded up to `precision`. @@ -6252,7 +6255,7 @@ _.ceil(6040, -2);

_.divide(dividend, divisor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15855 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16017 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] Divide two numbers. @@ -6277,7 +6280,7 @@ _.divide(6, 4);

_.floor(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15880 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16042 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] Computes `number` rounded down to `precision`. @@ -6308,7 +6311,7 @@ _.floor(4060, -2);

_.max(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15900 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] Computes the maximum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6336,7 +6339,7 @@ _.max([]);

_.maxBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15929 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16091 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] This method is like `_.max` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6369,7 +6372,7 @@ _.maxBy(objects, 'n');

_.mean(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15949 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16111 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] Computes the mean of the values in `array`. @@ -6393,7 +6396,7 @@ _.mean([4, 2, 8, 6]);

_.meanBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15976 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16138 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] This method is like `_.mean` except that it accepts `iteratee` which is invoked for each element in `array` to generate the value to be averaged. @@ -6426,7 +6429,7 @@ _.meanBy(objects, 'n');

_.min(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15998 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16160 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] Computes the minimum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6454,7 +6457,7 @@ _.min([]);

_.minBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16027 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16189 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] This method is like `_.min` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6487,7 +6490,7 @@ _.minBy(objects, 'n');

_.multiply(multiplier, multiplicand)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16048 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] Multiply two numbers. @@ -6512,7 +6515,7 @@ _.multiply(6, 4);

_.round(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16235 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] Computes `number` rounded to `precision`. @@ -6543,7 +6546,7 @@ _.round(4060, -2);

_.subtract(minuend, subtrahend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16252 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] Subtract two numbers. @@ -6568,7 +6571,7 @@ _.subtract(6, 4);

_.sum(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16108 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16270 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] Computes the sum of the values in `array`. @@ -6592,7 +6595,7 @@ _.sum([4, 2, 8, 6]);

_.sumBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] This method is like `_.sum` except that it accepts `iteratee` which is invoked for each element in `array` to generate the value to be summed. @@ -6631,7 +6634,7 @@ _.sumBy(objects, 'n');

_.clamp(number, [lower], upper)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13602 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13772 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -6660,7 +6663,7 @@ _.clamp(10, -5, 5);

_.inRange(number, [start=0], end)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13656 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13826 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] Checks if `n` is between `start` and up to, but not including, `end`. If `end` is not specified, it's set to `start` with `start` then set to `0`. @@ -6707,7 +6710,7 @@ _.inRange(-3, -2, -6);

_.random([lower=0], [upper=1], [floating])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] Produces a random number between the inclusive `lower` and `upper` bounds. If only one argument is provided a number between `0` and the given number @@ -6755,7 +6758,7 @@ _.random(1.2, 5.2);

_.assign(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12275 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12447 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] Assigns own enumerable string keyed properties of source objects to the destination object. Source objects are applied from left to right. @@ -6797,7 +6800,7 @@ _.assign({ 'a': 0 }, new Foo, new Bar);

_.assignIn(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12490 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it iterates over own and inherited source properties. @@ -6840,7 +6843,7 @@ _.assignIn({ 'a': 0 }, new Foo, new Bar);

_.assignInWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12351 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12523 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] This method is like `_.assignIn` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -6881,7 +6884,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.assignWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12383 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -6919,7 +6922,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.at(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12576 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] Creates an array of values corresponding to `paths` of `object`. @@ -6946,7 +6949,7 @@ _.at(object, ['a[0].b.c', 'a[1]']);

_.create(prototype, [properties])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12612 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] Creates an object that inherits from the `prototype` object. If a `properties` object is given, its own enumerable string keyed properties @@ -6990,7 +6993,7 @@ circle instanceof Shape;

_.defaults(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12638 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] Assigns own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that @@ -7021,7 +7024,7 @@ _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.defaultsDeep(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12492 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12662 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] This method is like `_.defaults` except that it recursively assigns default properties. @@ -7050,7 +7053,7 @@ _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });

_.findKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12532 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12702 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the key of the first element `predicate` returns truthy for instead of the element itself. @@ -7094,7 +7097,7 @@ _.findKey(users, 'active');

_.findLastKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12571 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12741 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] This method is like `_.findKey` except that it iterates over elements of a collection in the opposite order. @@ -7138,7 +7141,7 @@ _.findLastKey(users, 'active');

_.forIn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12603 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] Iterates over own and inherited enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked @@ -7175,7 +7178,7 @@ _.forIn(new Foo, function(value, key) {

_.forInRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12635 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12805 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] This method is like `_.forIn` except that it iterates over properties of `object` in the opposite order. @@ -7210,7 +7213,7 @@ _.forInRight(new Foo, function(value, key) {

_.forOwn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12669 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12839 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] Iterates over own enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked with three @@ -7247,7 +7250,7 @@ _.forOwn(new Foo, function(value, key) {

_.forOwnRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] This method is like `_.forOwn` except that it iterates over properties of `object` in the opposite order. @@ -7282,7 +7285,7 @@ _.forOwnRight(new Foo, function(value, key) {

_.functions(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12726 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] Creates an array of function property names from own enumerable properties of `object`. @@ -7314,7 +7317,7 @@ _.functions(new Foo);

_.functionsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12753 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] Creates an array of function property names from own and inherited enumerable properties of `object`. @@ -7346,7 +7349,7 @@ _.functionsIn(new Foo);

_.get(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12782 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12952 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place. @@ -7381,7 +7384,7 @@ _.get(object, 'a.b.c', 'default');

_.has(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12814 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L12984 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] Checks if `path` is a direct property of `object`. @@ -7418,7 +7421,7 @@ _.has(other, 'a');

_.hasIn(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12844 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13014 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] Checks if `path` is a direct or inherited property of `object`. @@ -7454,7 +7457,7 @@ _.hasIn(object, 'b');

_.invert(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12866 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13036 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate values, subsequent values overwrite @@ -7482,7 +7485,7 @@ _.invert(object);

_.invertBy(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13066 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] This method is like `_.invert` except that the inverted object is generated from the results of running each element of `object` thru `iteratee`. The @@ -7518,7 +7521,7 @@ _.invertBy(object, function(value) {

_.invoke(object, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12922 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] Invokes the method at `path` of `object`. @@ -7546,7 +7549,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3);

_.keys(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12952 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13122 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] Creates an array of the own enumerable property names of `object`.
@@ -7585,7 +7588,7 @@ _.keys('hi');

_.keysIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L12979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13149 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable property names of `object`.
@@ -7619,7 +7622,7 @@ _.keysIn(new Foo);

_.mapKeys(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13004 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] The opposite of `_.mapValues`; this method creates an object with the same values as `object` and keys generated by running each own enumerable @@ -7649,7 +7652,7 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {

_.mapValues(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13042 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13212 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] Creates an object with the same keys as `object` and values generated by running each own enumerable string keyed property of `object` thru @@ -7686,7 +7689,7 @@ _.mapValues(users, 'age');

_.merge(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13083 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13253 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it recursively merges own and inherited enumerable string keyed properties of source objects into the @@ -7728,12 +7731,12 @@ _.merge(object, other);

_.mergeWith(object, sources, customizer)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13118 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13288 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] This method is like `_.merge` except that it accepts `customizer` which is invoked to produce the merged values of the destination and source properties. If `customizer` returns `undefined`, merging is handled by the -method instead. The `customizer` is invoked with seven arguments:
+method instead. The `customizer` is invoked with six arguments:
*(objValue, srcValue, key, object, source, stack)*.

@@ -7770,7 +7773,7 @@ _.mergeWith(object, other, customizer);

_.omit(object, [props])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13141 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13311 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] The opposite of `_.pick`; this method creates an object composed of the own and inherited enumerable string keyed properties of `object` that are @@ -7799,7 +7802,7 @@ _.omit(object, ['a', 'c']);

_.omitBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13169 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13339 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] The opposite of `_.pickBy`; this method creates an object composed of the own and inherited enumerable string keyed properties of `object` that @@ -7829,7 +7832,7 @@ _.omitBy(object, _.isNumber);

_.pick(object, [props])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13190 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13360 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] Creates an object composed of the picked `object` properties. @@ -7856,7 +7859,7 @@ _.pick(object, ['a', 'c']);

_.pickBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13212 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13382 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] Creates an object composed of the `object` properties `predicate` returns truthy for. The predicate is invoked with two arguments: *(value, key)*. @@ -7884,7 +7887,7 @@ _.pickBy(object, _.isNumber);

_.result(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13415 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] This method is like `_.get` except that if the resolved value is a function it's invoked with the `this` binding of its parent object and @@ -7923,7 +7926,7 @@ _.result(object, 'a[0].b.c3', _.constant('default'));

_.set(object, path, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13295 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13465 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] Sets the value at `path` of `object`. If a portion of `path` doesn't exist, it's created. Arrays are created for missing index properties while objects @@ -7962,7 +7965,7 @@ console.log(object.x[0].y.z);

_.setWith(object, path, value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13323 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13493 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] This method is like `_.set` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -7997,7 +8000,7 @@ _.setWith(object, '[0][1]', 'a', Object);

_.toPairs(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13352 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13522 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] Creates an array of own enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map or set, its @@ -8033,7 +8036,7 @@ _.toPairs(new Foo);

_.toPairsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13378 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13548 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] Creates an array of own and inherited enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map @@ -8069,7 +8072,7 @@ _.toPairsIn(new Foo);

_.transform(object, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13410 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13580 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] An alternative to `_.reduce`; this method transforms `object` to a new `accumulator` object which is the result of running each of its own @@ -8109,7 +8112,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.unset(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13459 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13629 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] Removes the property at `path` of `object`.
@@ -8147,7 +8150,7 @@ console.log(object);

_.update(object, path, updater)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13490 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13660 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] This method is like `_.set` except that accepts `updater` to produce the value to set. Use `_.updateWith` to customize `path` creation. The `updater` @@ -8185,7 +8188,7 @@ console.log(object.x[0].y.z);

_.updateWith(object, path, updater, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13688 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] This method is like `_.update` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8220,7 +8223,7 @@ _.updateWith(object, '[0][1]', _.constant('a'), Object);

_.values(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13549 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13719 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] Creates an array of the own enumerable string keyed property values of `object`.
@@ -8257,7 +8260,7 @@ _.values('hi');

_.valuesIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13577 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13747 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable string keyed property values of `object`. @@ -8298,7 +8301,7 @@ _.valuesIn(new Foo);

_(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1647 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1644 "View in source") [Ⓣ][1] Creates a `lodash` object which wraps `value` to enable implicit method chain sequences. Methods that operate on and return arrays, collections, @@ -8434,7 +8437,7 @@ _.isArray(squares.value());

_.chain(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8401 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8589 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance that wraps `value` with explicit method chain sequences enabled. The result of such sequences must be unwrapped @@ -8473,7 +8476,7 @@ var youngest = _

_.tap(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8430 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8618 "View in source") [Ⓣ][1] This method invokes `interceptor` and returns `value`. The interceptor is invoked with one argument; *(value)*. The purpose of this method is to @@ -8506,7 +8509,7 @@ _([1, 2, 3])

_.thru(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8458 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8646 "View in source") [Ⓣ][1] This method is like `_.tap` except that it returns the result of `interceptor`. The purpose of this method is to "pass thru" values replacing intermediate @@ -8539,7 +8542,7 @@ _(' abc ')

_.prototype[Symbol.iterator]()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8614 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8801 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -8565,7 +8568,7 @@ Array.from(wrapped);

_.prototype.at([paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8478 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8666 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -8591,7 +8594,7 @@ _(object).at(['a[0].b.c', 'a[1]']).value();

_.prototype.chain()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8530 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8717 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance with explicit method chain sequences enabled. @@ -8626,7 +8629,7 @@ _(users)

_.prototype.commit()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8560 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8747 "View in source") [Ⓣ][1] Executes the chain sequence and returns the wrapped result. @@ -8660,7 +8663,7 @@ console.log(array);

_.prototype.next()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8586 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8773 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -8690,7 +8693,7 @@ wrapped.next();

_.prototype.plant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8642 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8829 "View in source") [Ⓣ][1] Creates a clone of the chain sequence planting `value` as the wrapped value. @@ -8724,7 +8727,7 @@ wrapped.value();

_.prototype.reverse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8682 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8869 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
@@ -8753,7 +8756,7 @@ console.log(array);

_.prototype.value()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L8714 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L8901 "View in source") [Ⓣ][1] Executes the chain sequence to resolve the unwrapped value. @@ -8783,7 +8786,7 @@ _([1, 2, 3]).value();

_.camelCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13760 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13930 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). @@ -8813,7 +8816,7 @@ _.camelCase('__FOO_BAR__');

_.capitalize([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13780 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13950 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case and the remaining to lower case. @@ -8838,7 +8841,7 @@ _.capitalize('FRED');

_.deburr([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13802 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L13972 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] Deburrs `string` by converting [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) @@ -8866,7 +8869,7 @@ _.deburr('dĂ©jĂ  vu');

_.endsWith([string=''], [target], [position=string.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13830 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14000 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] Checks if `string` ends with the given target string. @@ -8898,10 +8901,10 @@ _.endsWith('abc', 'b', 2);

_.escape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13878 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14042 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] -Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to -their corresponding HTML entities. +Converts the characters "&", "<", ">", '"', and "'" in `string` to their +corresponding HTML entities.

**Note:** No other characters are escaped. To escape additional @@ -8915,13 +8918,6 @@ unless they're part of a tag or unquoted attribute value. See *(under "semi-related fun fact")* for more details.

-Backticks are escaped because in IE < `9`, they can break out of -attribute values or HTML comments. See [#59](https://html5sec.org/#59), -[#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and -[#133](https://html5sec.org/#133) of the -[HTML5 Security Cheatsheet](https://html5sec.org/) for more details. -
-
When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) to reduce XSS vectors. @@ -8946,7 +8942,7 @@ _.escape('fred, barney, & pebbles');

_.escapeRegExp([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13900 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -8971,7 +8967,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)');

_.kebabCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -9002,7 +8998,7 @@ _.kebabCase('__FOO_BAR__');

_.lowerCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13952 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14116 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to lower case. @@ -9032,7 +9028,7 @@ _.lowerCase('__FOO_BAR__');

_.lowerFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to lower case. @@ -9059,7 +9055,7 @@ _.lowerFirst('FRED');

_.pad([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L13998 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14162 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] Pads `string` on the left and right sides if it's shorter than `length`. Padding characters are truncated if they can't be evenly divided by `length`. @@ -9092,7 +9088,7 @@ _.pad('abc', 3);

_.padEnd([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14037 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14201 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] Pads `string` on the right side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9125,7 +9121,7 @@ _.padEnd('abc', 3);

_.padStart([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14070 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14234 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] Pads `string` on the left side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9158,7 +9154,7 @@ _.padStart('abc', 3);

_.parseInt(string, [radix=10])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14268 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] Converts `string` to an integer of the specified radix. If `radix` is `undefined` or `0`, a `radix` of `10` is used unless `value` is a @@ -9192,7 +9188,7 @@ _.map(['6', '08', '10'], _.parseInt);

_.repeat([string=''], [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14138 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] Repeats the given string `n` times. @@ -9223,7 +9219,7 @@ _.repeat('abc', 0);

_.replace([string=''], pattern, replacement)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14166 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14327 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] Replaces matches for `pattern` in `string` with `replacement`.
@@ -9253,7 +9249,7 @@ _.replace('Hi Fred', 'Fred', 'Barney');

_.snakeCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14194 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14355 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). @@ -9284,7 +9280,7 @@ _.snakeCase('--FOO-BAR--');

_.split([string=''], separator, [limit])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14217 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14378 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] Splits `string` by `separator`.
@@ -9314,7 +9310,7 @@ _.split('a-b-c', '-', 2);

_.startCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14420 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). @@ -9345,7 +9341,7 @@ _.startCase('__FOO_BAR__');

_.startsWith([string=''], [target], [position=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14286 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14447 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] Checks if `string` starts with the given target string. @@ -9376,8 +9372,8 @@ _.startsWith('abc', 'b', 1); -

_.template([string=''], [options={}], [options.escape=_.templateSettings.escape], [options.evaluate=_.templateSettings.evaluate], [options.imports=_.templateSettings.imports], [options.interpolate=_.templateSettings.interpolate], [options.sourceURL='lodash.templateSources[n]'], [options.variable='obj'])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14396 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] +

_.template([string=''], [options={}])

+[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14558 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -9435,7 +9431,8 @@ var compiled = _.template('<% print("hello " + user); %>!'); compiled({ 'user': 'barney' }); // => 'hello barney!' -// Use the ES delimiter as an alternative to the default "interpolate" delimiter. +// Use the ES template literal delimiter as an "interpolate" delimiter. +// Disable support by replacing the "interpolate" delimiter. var compiled = _.template('hello ${ user }!'); compiled({ 'user': 'pebbles' }); // => 'hello pebbles!' @@ -9486,7 +9483,7 @@ fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\

_.toLower([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14525 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14687 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to lower case just like [String#toLowerCase](https://mdn.io/toLowerCase). @@ -9517,7 +9514,7 @@ _.toLower('__FOO_BAR__');

_.toUpper([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14712 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to upper case just like [String#toUpperCase](https://mdn.io/toUpperCase). @@ -9548,7 +9545,7 @@ _.toUpper('__foo_bar__');

_.trim([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14576 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14738 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] Removes leading and trailing whitespace or specified characters from `string`. @@ -9579,7 +9576,7 @@ _.map([' foo ', ' bar '], _.trim);

_.trimEnd([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14611 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] Removes trailing whitespace or specified characters from `string`. @@ -9607,7 +9604,7 @@ _.trimEnd('-_-abc-_-', '_-');

_.trimStart([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14644 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14806 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] Removes leading whitespace or specified characters from `string`. @@ -9634,8 +9631,8 @@ _.trimStart('-_-abc-_-', '_-'); -

_.truncate([string=''], [options={}], [options.length=30], [options.omission='...'], [options.separator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14695 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] +

_.truncate([string=''], [options={}])

+[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14857 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] Truncates `string` if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission @@ -9682,10 +9679,10 @@ _.truncate('hi-diddly-ho there, neighborino', {

_.unescape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14770 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14932 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] The inverse of `_.escape`; this method converts the HTML entities -`&`, `<`, `>`, `"`, `'`, and ``` in `string` to +`&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.

@@ -9712,7 +9709,7 @@ _.unescape('fred, barney, & pebbles');

_.upperCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14797 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14959 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to upper case. @@ -9742,7 +9739,7 @@ _.upperCase('__foo_bar__');

_.upperFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14818 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L14980 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case. @@ -9769,7 +9766,7 @@ _.upperFirst('FRED');

_.words([string=''], [pattern])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14839 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] Splits `string` into an array of its words. @@ -9803,7 +9800,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g);

_.attempt(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14873 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15035 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] Attempts to invoke `func`, returning either the result or the caught error object. Any additional arguments are provided to `func` when it's invoked. @@ -9835,7 +9832,7 @@ if (_.isError(elements)) {

_.bindAll(object, methodNames)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14907 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] Binds methods of an object to the object itself, overwriting the existing method. @@ -9872,7 +9869,7 @@ jQuery(element).on('click', view.click);

_.cond(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14944 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15106 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] Creates a function that iterates over `pairs` and invokes the corresponding function of the first predicate to return truthy. The predicate-function @@ -9911,7 +9908,7 @@ func({ 'a': '1', 'b': '2' });

_.conforms(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L14990 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if @@ -9946,7 +9943,7 @@ _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));

_.constant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15013 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15175 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] Creates a function that returns `value`. @@ -9975,7 +9972,7 @@ console.log(objects[0] === objects[1]);

_.defaultTo(value, defaultValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15039 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15201 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] Checks `value` to determine whether a default value should be returned in its place. The `defaultValue` is returned if `value` is `NaN`, `null`, @@ -10005,7 +10002,7 @@ _.defaultTo(undefined, 10);

_.flow([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15065 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15227 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] Creates a function that returns the result of invoking the given functions with the `this` binding of the created function, where each successive @@ -10036,7 +10033,7 @@ addSquare(1, 2);

_.flowRight([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15088 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15250 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] This method is like `_.flow` except that it creates a function that invokes the given functions from right to left. @@ -10066,7 +10063,7 @@ addSquare(1, 2);

_.identity(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15106 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15268 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] This method returns the first argument it receives. @@ -10092,7 +10089,7 @@ console.log(_.identity(object) === object);

_.iteratee([func=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15314 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the arguments of the created function. If `func` is a property name, the created function returns the @@ -10144,7 +10141,7 @@ _.filter(['abc', 'def'], /ef/);

_.matches(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15346 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between a given object and `source`, returning `true` if the given object has equivalent @@ -10184,7 +10181,7 @@ _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));

_.matchesProperty(path, srcValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15214 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15376 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between the value at `path` of a given object to `srcValue`, returning `true` if the @@ -10221,7 +10218,7 @@ _.find(objects, _.matchesProperty('a', 4));

_.method(path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15242 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `path` of a given object. Any additional arguments are provided to the invoked method. @@ -10255,7 +10252,7 @@ _.map(objects, _.method(['a', 'b']));

_.methodOf(object, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15433 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] The opposite of `_.method`; this method creates a function that invokes the method at a given path of `object`. Any additional arguments are @@ -10287,8 +10284,8 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object)); -

_.mixin([object=lodash], source, [options={}], [options.chain=true])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15313 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] +

_.mixin([object=lodash], source, [options={}])

+[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15475 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] Adds all own enumerable string keyed function properties of a source object to the destination object. If `object` is a function, then methods @@ -10335,7 +10332,7 @@ _('fred').vowels();

_.noConflict()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15362 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15524 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] Reverts the `_` variable to its previous value and returns a reference to the `lodash` function. @@ -10356,7 +10353,7 @@ var lodash = _.noConflict();

_.noop()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15381 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15543 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] This method returns `undefined`. @@ -10374,7 +10371,7 @@ _.times(2, _.noop);

_.nthArg([n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15405 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15567 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned. @@ -10404,7 +10401,7 @@ func('a', 'b', 'c', 'd');

_.over([iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15592 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] Creates a function that invokes `iteratees` with the arguments it receives and returns their results. @@ -10431,7 +10428,7 @@ func(1, 2, 3, 4);

_.overEvery([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15456 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15618 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10464,7 +10461,7 @@ func(NaN);

_.overSome([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15482 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15644 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] Creates a function that checks if **any** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10497,7 +10494,7 @@ func(NaN);

_.property(path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15506 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15668 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] Creates a function that returns the value at `path` of a given object. @@ -10529,7 +10526,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');

_.propertyOf(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15531 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15693 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] The opposite of `_.property`; this method creates a function that returns the value at a given path of `object`. @@ -10560,7 +10557,7 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object));

_.range([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15740 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] Creates an array of numbers *(positive and/or negative)* progressing from `start` up to, but not including, `end`. A step of `-1` is used if a negative @@ -10611,7 +10608,7 @@ _.range(0);

_.rangeRight([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15616 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15778 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] This method is like `_.range` except that it populates values in descending order. @@ -10656,7 +10653,7 @@ _.rangeRight(0);

_.runInContext([context=root])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1405 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1410 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] Create a new pristine `lodash` function using the `context` object. @@ -10685,13 +10682,6 @@ lodash.isFunction(lodash.foo); lodash.isFunction(lodash.bar); // => true -// Use `context` to stub `Date#getTime` use in `_.now`. -var stubbed = _.runInContext({ - 'Date': function() { - return { 'getTime': stubGetTime }; - } -}); - // Create a suped-up `defer` in Node.js. var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; ``` @@ -10702,7 +10692,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;

_.stubArray()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15636 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] This method returns a new empty array. @@ -10728,7 +10718,7 @@ console.log(arrays[0] === arrays[1]);

_.stubFalse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15653 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15815 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] This method returns `false`. @@ -10749,7 +10739,7 @@ _.times(2, _.stubFalse);

_.stubObject()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15675 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15837 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] This method returns a new empty object. @@ -10775,7 +10765,7 @@ console.log(objects[0] === objects[1]);

_.stubString()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15692 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15854 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] This method returns an empty string. @@ -10796,7 +10786,7 @@ _.times(2, _.stubString);

_.stubTrue()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15709 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15871 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] This method returns `true`. @@ -10817,7 +10807,7 @@ _.times(2, _.stubTrue);

_.times(n, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15732 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15894 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is invoked with one argument; *(index)*. @@ -10846,7 +10836,7 @@ _.times(3, String);

_.toPath(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15767 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15929 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] Converts `value` to a property path array. @@ -10873,7 +10863,7 @@ _.toPath('a[0].b.c');

_.uniqueId([prefix=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L15791 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L15953 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] Generates a unique ID. If `prefix` is given, the ID is appended to it. @@ -10906,7 +10896,7 @@ _.uniqueId();

_.VERSION

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L16482 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L16644 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -10917,7 +10907,7 @@ _.uniqueId();

_.templateSettings

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1692 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1689 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] (Object): By default, the template delimiters used by lodash are like those in embedded Ruby *(ERB)*. Change the following template settings to use @@ -10930,7 +10920,7 @@ alternative delimiters.

_.templateSettings.escape

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1700 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1697 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -10941,7 +10931,7 @@ alternative delimiters.

_.templateSettings.evaluate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1708 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1705 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -10952,7 +10942,7 @@ alternative delimiters.

_.templateSettings.imports

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1732 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1729 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -10963,7 +10953,7 @@ alternative delimiters.

_.templateSettings.interpolate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1716 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1713 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -10974,7 +10964,7 @@ alternative delimiters.

_.templateSettings.variable

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1724 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1721 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. @@ -10991,7 +10981,7 @@ alternative delimiters.

_.templateSettings.imports._

-[Ⓢ](https://github.com/lodash/lodash/blob/4.15.0/lodash.js#L1740 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.16.0/lodash.js#L1737 "View in source") [Ⓣ][1] A reference to the `lodash` function. diff --git a/fp/_mapping.js b/fp/_mapping.js index dd4abcb551..7fa8e672e0 100644 --- a/fp/_mapping.js +++ b/fp/_mapping.js @@ -108,9 +108,10 @@ exports.aryMethod = { 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', - 'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace', - 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', - 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith' + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' ], '4': [ 'fill', 'setWith', 'updateWith' @@ -189,6 +190,8 @@ exports.methodRearg = { 'padCharsStart': [2, 1, 0], 'pullAllBy': [2, 1, 0], 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], @@ -310,6 +313,8 @@ exports.remap = { 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', 'restFrom': 'rest', 'spreadFrom': 'spread', 'trimChars': 'trim', diff --git a/lib/common/file.js b/lib/common/file.js index 879e96c669..8c57ab8824 100644 --- a/lib/common/file.js +++ b/lib/common/file.js @@ -1,11 +1,11 @@ 'use strict'; -var _ = require('lodash'), - fs = require('fs-extra'), - glob = require('glob'), - path = require('path'); +const _ = require('lodash'); +const fs = require('fs-extra'); +const glob = require('glob'); +const path = require('path'); -var minify = require('../common/minify.js'); +const minify = require('../common/minify.js'); /*----------------------------------------------------------------------------*/ @@ -30,8 +30,8 @@ function copy(srcPath, destPath) { * @returns {Object} Returns the object of compiled templates. */ function globTemplate(pattern) { - return _.transform(glob.sync(pattern), function(result, filePath) { - var key = path.basename(filePath, path.extname(filePath)); + return _.transform(glob.sync(pattern), (result, filePath) => { + const key = path.basename(filePath, path.extname(filePath)); result[key] = _.template(fs.readFileSync(filePath, 'utf8')); }, {}); } @@ -64,8 +64,8 @@ function write(destPath, data) { /*----------------------------------------------------------------------------*/ module.exports = { - 'copy': copy, - 'globTemplate': globTemplate, - 'min': min, - 'write': write + copy, + globTemplate, + min, + write }; diff --git a/lib/common/mapping.js b/lib/common/mapping.js index 332f5afd48..f52b86072a 100644 --- a/lib/common/mapping.js +++ b/lib/common/mapping.js @@ -1,8 +1,8 @@ 'use strict'; -var _mapping = require('../../fp/_mapping'), - util = require('./util'), - Hash = util.Hash; +const _mapping = require('../../fp/_mapping'); +const util = require('./util'); +const Hash = util.Hash; /*----------------------------------------------------------------------------*/ diff --git a/lib/common/minify.js b/lib/common/minify.js index 5e536c2b51..c47c986008 100644 --- a/lib/common/minify.js +++ b/lib/common/minify.js @@ -1,10 +1,10 @@ 'use strict'; -var _ = require('lodash'), - fs = require('fs-extra'), - uglify = require('uglify-js'); +const _ = require('lodash'); +const fs = require('fs-extra'); +const uglify = require('uglify-js'); -var uglifyOptions = require('./uglify.options'); +const uglifyOptions = require('./uglify.options'); /*----------------------------------------------------------------------------*/ @@ -32,7 +32,7 @@ function minify(srcPath, destPath, callback, options) { if (!destPath) { destPath = srcPath.replace(/(?=\.js$)/, '.min'); } - var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions)); + const output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions)); fs.writeFile(destPath, output.code, 'utf-8', callback); } diff --git a/lib/common/uglify.options.js b/lib/common/uglify.options.js index 64aebf6f53..e82596110e 100644 --- a/lib/common/uglify.options.js +++ b/lib/common/uglify.options.js @@ -8,6 +8,7 @@ */ module.exports = { 'compress': { + 'collapse_vars': true, 'negate_iife': false, 'pure_getters': true, 'unsafe': true, diff --git a/lib/common/util.js b/lib/common/util.js index b7850ff4ce..0ae2bf77d2 100644 --- a/lib/common/util.js +++ b/lib/common/util.js @@ -1,6 +1,6 @@ 'use strict'; -var _ = require('lodash'); +const _ = require('lodash'); /*----------------------------------------------------------------------------*/ @@ -13,7 +13,7 @@ var _ = require('lodash'); * @returns {Object} Returns the new hash object. */ function Hash(properties) { - return _.transform(properties, function(result, value, key) { + return _.transform(properties, (result, value, key) => { result[key] = (_.isPlainObject(value) && !(value instanceof Hash)) ? new Hash(value) : value; @@ -35,6 +35,6 @@ function pitch(error) { } module.exports = { - 'Hash': Hash, - 'pitch': pitch + Hash, + pitch }; diff --git a/lib/fp/build-dist.js b/lib/fp/build-dist.js index e4764c6d71..9615f06c09 100644 --- a/lib/fp/build-dist.js +++ b/lib/fp/build-dist.js @@ -1,19 +1,19 @@ 'use strict'; -var _ = require('lodash'), - async = require('async'), - path = require('path'), - webpack = require('webpack'); +const _ = require('lodash'); +const async = require('async'); +const path = require('path'); +const webpack = require('webpack'); -var file = require('../common/file'), - util = require('../common/util'); +const file = require('../common/file'); +const util = require('../common/util'); -var basePath = path.join(__dirname, '..', '..'), - distPath = path.join(basePath, 'dist'), - fpPath = path.join(basePath, 'fp'), - filename = 'lodash.fp.js'; +const basePath = path.join(__dirname, '..', '..'); +const distPath = path.join(basePath, 'dist'); +const fpPath = path.join(basePath, 'fp'); +const filename = 'lodash.fp.js'; -var fpConfig = { +const fpConfig = { 'entry': path.join(fpPath, '_convertBrowser.js'), 'output': { 'path': distPath, @@ -27,7 +27,7 @@ var fpConfig = { ] }; -var mappingConfig = { +const mappingConfig = { 'entry': path.join(fpPath, '_mapping.js'), 'output': { 'path': distPath, diff --git a/lib/fp/build-doc.js b/lib/fp/build-doc.js index 6edd802a2b..6134449573 100644 --- a/lib/fp/build-doc.js +++ b/lib/fp/build-doc.js @@ -1,22 +1,22 @@ 'use strict'; -var _ = require('lodash'), - fs = require('fs-extra'), - path = require('path'); +const _ = require('lodash'); +const fs = require('fs-extra'); +const path = require('path'); -var file = require('../common/file'), - mapping = require('../common/mapping'), - util = require('../common/util'); +const file = require('../common/file'); +const mapping = require('../common/mapping'); +const util = require('../common/util'); -var templatePath = path.join(__dirname, 'template/doc'), - template = file.globTemplate(path.join(templatePath, '*.jst')); +const templatePath = path.join(__dirname, 'template/doc'); +const template = file.globTemplate(path.join(templatePath, '*.jst')); -var argNames = ['a', 'b', 'c', 'd']; +const argNames = ['a', 'b', 'c', 'd']; -var templateData = { - 'mapping': mapping, - 'toArgOrder': toArgOrder, - 'toFuncList': toFuncList +const templateData = { + mapping, + toArgOrder, + toFuncList }; /** @@ -28,8 +28,8 @@ var templateData = { * @returns {string} Returns the named argument string. */ function toArgOrder(indexes) { - var reordered = []; - _.each(indexes, function(newIndex, index) { + const reordered = []; + _.each(indexes, (newIndex, index) => { reordered[newIndex] = argNames[index]; }); return '`(' + reordered.join(', ') + ')`'; @@ -43,18 +43,15 @@ function toArgOrder(indexes) { * @returns {string} Returns the function list string. */ function toFuncList(funcNames) { - var chunks = _.chunk(funcNames.slice().sort(), 5), - lastChunk = _.last(chunks), - last = lastChunk ? lastChunk.pop() : undefined; + let chunks = _.chunk(funcNames.slice().sort(), 5); + let lastChunk = _.last(chunks); + const lastName = lastChunk ? lastChunk.pop() : undefined; chunks = _.reject(chunks, _.isEmpty); lastChunk = _.last(chunks); - var result = '`' + _.map(chunks, function(chunk) { - return chunk.join('`, `') + '`'; - }).join(',\n`'); - - if (last == null) { + let result = '`' + _.map(chunks, chunk => chunk.join('`, `') + '`').join(',\n`'); + if (lastName == null) { return result; } if (_.size(chunks) > 1 || _.size(lastChunk) > 1) { @@ -62,7 +59,7 @@ function toFuncList(funcNames) { } result += ' &'; result += _.size(lastChunk) < 5 ? ' ' : '\n'; - return result + '`' + last + '`'; + return result + '`' + lastName + '`'; } /*----------------------------------------------------------------------------*/ diff --git a/lib/fp/build-modules.js b/lib/fp/build-modules.js index 9578499e79..c7acc7e632 100644 --- a/lib/fp/build-modules.js +++ b/lib/fp/build-modules.js @@ -1,25 +1,25 @@ 'use strict'; -var _ = require('lodash'), - async = require('async'), - glob = require('glob'), - path = require('path'); +const _ = require('lodash'); +const async = require('async'); +const glob = require('glob'); +const path = require('path'); -var file = require('../common/file'), - mapping = require('../common/mapping'), - util = require('../common/util'); +const file = require('../common/file'); +const mapping = require('../common/mapping'); +const util = require('../common/util'); -var templatePath = path.join(__dirname, 'template/modules'), - template = file.globTemplate(path.join(templatePath, '*.jst')); +const templatePath = path.join(__dirname, 'template/modules'); +const template = file.globTemplate(path.join(templatePath, '*.jst')); -var aryMethods = _.union( +const aryMethods = _.union( mapping.aryMethod[1], mapping.aryMethod[2], mapping.aryMethod[3], mapping.aryMethod[4] ); -var categories = [ +const categories = [ 'array', 'collection', 'date', @@ -33,7 +33,7 @@ var categories = [ 'util' ]; -var ignored = [ +const ignored = [ '_*.js', 'core.js', 'core.min.js', @@ -85,7 +85,7 @@ function isThru(name) { * @returns {*} Returns the metadata for `func`. */ function getTemplate(moduleName) { - var data = { + const data = { 'name': _.get(mapping.aliasToReal, moduleName, moduleName), 'mapping': mapping }; @@ -113,28 +113,28 @@ function getTemplate(moduleName) { function build(target) { target = path.resolve(target); - var fpPath = path.join(target, 'fp'); + const fpPath = path.join(target, 'fp'); // Glob existing lodash module paths. - var modulePaths = glob.sync(path.join(target, '*.js'), { + const modulePaths = glob.sync(path.join(target, '*.js'), { 'nodir': true, - 'ignore': ignored.map(function(filename) { + 'ignore': ignored.map(filename => { return path.join(target, filename); }) }); // Add FP alias and remapped module paths. - _.each([mapping.aliasToReal, mapping.remap], function(data) { - _.forOwn(data, function(realName, alias) { - var modulePath = path.join(target, alias + '.js'); + _.each([mapping.aliasToReal, mapping.remap], data => { + _.forOwn(data, (realName, alias) => { + const modulePath = path.join(target, alias + '.js'); if (!_.includes(modulePaths, modulePath)) { modulePaths.push(modulePath); } }); }); - var actions = modulePaths.map(function(modulePath) { - var moduleName = path.basename(modulePath, '.js'); + const actions = modulePaths.map(modulePath => { + const moduleName = path.basename(modulePath, '.js'); return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName)); }); diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index 85ee91e427..5b903698f5 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -9,8 +9,7 @@ to produce immutable auto-curried iteratee-first data-last methods. In a browser: ```html - - +