# lodash

> Every lodash function available as `_` inside expressions: arrays, collections, objects, strings and more, in the exact version Sommatic AI runs.

Source: https://docs.sommatic.ai/en/expressions/lodash/

Version: 4.18.1 (MIT). Official documentation: https://lodash.com/docs/

Call any function through `_` inside `{{ }}`. Use them to group, filter, pick and reshape the data of earlier nodes:

```
{{ _.groupBy($json.items, 'status') }}
```

## Array

### `_.chunk(array, [size=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
elements.

- `array` (Array): The array to process.
- `size` (number, optional, default 1): The length of each chunk

Returns `Array`.

```javascript
_.chunk(['a', 'b', 'c', 'd'], 2)
```

Result (list):

```json
[
  [
    "a",
    "b"
  ],
  [
    "c",
    "d"
  ]
]
```

```javascript
_.chunk(['a', 'b', 'c', 'd'], 3)
```

Result (list):

```json
[
  [
    "a",
    "b",
    "c"
  ],
  [
    "d"
  ]
]
```

### `_.compact(array)`

Creates an array with all falsey values removed. The values `false`, `null`,
`0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.

- `array` (Array): The array to compact.

Returns `Array`.

```javascript
_.compact([0, 1, false, 2, '', 3])
```

Result (list):

```json
[
  1,
  2,
  3
]
```

### `_.concat(array, [values])`

Creates a new array concatenating `array` with any additional arrays
and/or values.

- `array` (Array): The array to concatenate.
- `values` (...*, optional): The values to concatenate.

Returns `Array`.

```javascript
var array = [1];
var other = _.concat(array, 2, [3], [[4]]);
console.log(other)
```

Result (undefined):

```json
undefined
```

```javascript
var array = [1];
var other = _.concat(array, 2, [3], [[4]]);
console.log(array)
```

Result (undefined):

```json
undefined
```

### `_.difference(array, [values])`

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 and references of result values are
determined by the first array.

**Note:** Unlike `_.pullAll`, this method returns a new array.

- `array` (Array): The array to inspect.
- `values` (...Array, optional): The values to exclude.

Returns `Array`.

```javascript
_.difference([2, 1], [2, 3])
```

Result (list):

```json
[
  1
]
```

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

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. 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.

- `array` (Array): The array to inspect.
- `values` (...Array, optional): The values to exclude.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Array`.

```javascript
_.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)
```

Result (list):

```json
[
  1.2
]
```

```javascript
_.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x')
```

Result (list):

```json
[
  {
    "x": 2
  }
]
```

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

This method is like `_.difference` except that it accepts `comparator`
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.

- `array` (Array): The array to inspect.
- `values` (...Array, optional): The values to exclude.
- `comparator` (Function, optional): The comparator invoked per element.

Returns `Array`.

```javascript
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
_.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual)
```

Result (list):

```json
[
  {
    "x": 2,
    "y": 1
  }
]
```

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

Creates a slice of `array` with `n` elements dropped from the beginning.

- `array` (Array): The array to query.
- `n` (number, optional, default 1): The number of elements to drop.

Returns `Array`.

```javascript
_.drop([1, 2, 3])
```

Result (list):

```json
[
  2,
  3
]
```

```javascript
_.drop([1, 2, 3], 2)
```

Result (list):

```json
[
  3
]
```

```javascript
_.drop([1, 2, 3], 5)
```

Result (list):

```json
[]
```

```javascript
_.drop([1, 2, 3], 0)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

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

Creates a slice of `array` with `n` elements dropped from the end.

- `array` (Array): The array to query.
- `n` (number, optional, default 1): The number of elements to drop.

Returns `Array`.

```javascript
_.dropRight([1, 2, 3])
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
_.dropRight([1, 2, 3], 2)
```

Result (list):

```json
[
  1
]
```

```javascript
_.dropRight([1, 2, 3], 5)
```

Result (list):

```json
[]
```

```javascript
_.dropRight([1, 2, 3], 0)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

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

Creates a slice of `array` excluding elements dropped from the end.
Elements are dropped until `predicate` returns falsey. The predicate is
invoked with three arguments: (value, index, array).

- `array` (Array): The array to query.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.dropRightWhile(users, function(o) { return !o.active; })
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.dropRightWhile(users, { 'user': 'pebbles', 'active': false })
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": true
  },
  {
    "user": "fred",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.dropRightWhile(users, ['active', false])
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.dropRightWhile(users, 'active')
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": true
  },
  {
    "user": "fred",
    "active": false
  },
  {
    "user": "pebbles",
    "active": false
  }
]
```

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

Creates a slice of `array` excluding elements dropped from the beginning.
Elements are dropped until `predicate` returns falsey. The predicate is
invoked with three arguments: (value, index, array).

- `array` (Array): The array to query.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.dropWhile(users, function(o) { return !o.active; })
```

Result (list):

```json
[
  {
    "user": "pebbles",
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.dropWhile(users, { 'user': 'barney', 'active': false })
```

Result (list):

```json
[
  {
    "user": "fred",
    "active": false
  },
  {
    "user": "pebbles",
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.dropWhile(users, ['active', false])
```

Result (list):

```json
[
  {
    "user": "pebbles",
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.dropWhile(users, 'active')
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": false
  },
  {
    "user": "fred",
    "active": false
  },
  {
    "user": "pebbles",
    "active": true
  }
]
```

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

Fills elements of `array` with `value` from `start` up to, but not
including, `end`.

**Note:** This method mutates `array`.

- `array` (Array): The array to fill.
- `value` (*): The value to fill `array` with.
- `start` (number, optional, default 0): The start position.
- `end` (number, optional, default array.length): The end position.

Returns `Array`.

```javascript
var array = [1, 2, 3];
console.log(array)
```

Result (undefined):

```json
undefined
```

```javascript
var array = [1, 2, 3];
_.fill(Array(3), 2)
```

Result (list):

```json
[
  2,
  2,
  2
]
```

```javascript
var array = [1, 2, 3];
_.fill([4, 6, 8, 10], '*', 1, 3)
```

Result (list):

```json
[
  4,
  "*",
  "*",
  10
]
```

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

This method is like `_.find` except that it returns the index of the first
element `predicate` returns truthy for instead of the element itself.

- `array` (Array): The array to inspect.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.
- `fromIndex` (number, optional, default 0): The index to search from.

Returns `number`.

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.findIndex(users, function(o) { return o.user == 'barney'; })
```

Result (number):

```json
0
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.findIndex(users, { 'user': 'fred', 'active': false })
```

Result (number):

```json
1
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.findIndex(users, ['active', false])
```

Result (number):

```json
0
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.findIndex(users, 'active')
```

Result (number):

```json
2
```

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

This method is like `_.findIndex` except that it iterates over elements
of `collection` from right to left.

- `array` (Array): The array to inspect.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.
- `fromIndex` (number, optional, default array.length-1): The index to search from.

Returns `number`.

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.findLastIndex(users, function(o) { return o.user == 'pebbles'; })
```

Result (number):

```json
2
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.findLastIndex(users, { 'user': 'barney', 'active': true })
```

Result (number):

```json
0
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.findLastIndex(users, ['active', false])
```

Result (number):

```json
2
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.findLastIndex(users, 'active')
```

Result (number):

```json
0
```

### `_.flatten(array)`

Flattens `array` a single level deep.

- `array` (Array): The array to flatten.

Returns `Array`.

```javascript
_.flatten([1, [2, [3, [4]], 5]])
```

Result (list):

```json
[
  1,
  2,
  [
    3,
    [
      4
    ]
  ],
  5
]
```

### `_.flattenDeep(array)`

Recursively flattens `array`.

- `array` (Array): The array to flatten.

Returns `Array`.

```javascript
_.flattenDeep([1, [2, [3, [4]], 5]])
```

Result (list):

```json
[
  1,
  2,
  3,
  4,
  5
]
```

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

Recursively flatten `array` up to `depth` times.

- `array` (Array): The array to flatten.
- `depth` (number, optional, default 1): The maximum recursion depth.

Returns `Array`.

```javascript
var array = [1, [2, [3, [4]], 5]];
_.flattenDepth(array, 1)
```

Result (list):

```json
[
  1,
  2,
  [
    3,
    [
      4
    ]
  ],
  5
]
```

```javascript
var array = [1, [2, [3, [4]], 5]];
_.flattenDepth(array, 2)
```

Result (list):

```json
[
  1,
  2,
  3,
  [
    4
  ],
  5
]
```

### `_.fromPairs(pairs)`

The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`.

- `pairs` (Array): The key-value pairs.

Returns `Object`.

```javascript
_.fromPairs([['a', 1], ['b', 2]])
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

### `_.head(array)`

Gets the first element of `array`.

- `array` (Array): The array to query.

Returns `*`.

```javascript
_.head([1, 2, 3])
```

Result (number):

```json
1
```

```javascript
_.head([])
```

Result (undefined):

```json
undefined
```

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

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)
for equality comparisons. If `fromIndex` is negative, it's used as the
offset from the end of `array`.

- `array` (Array): The array to inspect.
- `value` (*): The value to search for.
- `fromIndex` (number, optional, default 0): The index to search from.

Returns `number`.

```javascript
_.indexOf([1, 2, 1, 2], 2)
```

Result (number):

```json
1
```

```javascript
_.indexOf([1, 2, 1, 2], 2, 2)
```

Result (number):

```json
3
```

### `_.initial(array)`

Gets all but the last element of `array`.

- `array` (Array): The array to query.

Returns `Array`.

```javascript
_.initial([1, 2, 3])
```

Result (list):

```json
[
  1,
  2
]
```

### `_.intersection([arrays])`

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 and references of result values are
determined by the first array.

- `arrays` (...Array, optional): The arrays to inspect.

Returns `Array`.

```javascript
_.intersection([2, 1], [2, 3])
```

Result (list):

```json
[
  2
]
```

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

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. The order and references of result values are
determined by the first array. The iteratee is invoked with one argument:
(value).

- `arrays` (...Array, optional): The arrays to inspect.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Array`.

```javascript
_.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor)
```

Result (list):

```json
[
  2.1
]
```

```javascript
_.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x')
```

Result (list):

```json
[
  {
    "x": 1
  }
]
```

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

This method is like `_.intersection` except that it accepts `comparator`
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).

- `arrays` (...Array, optional): The arrays to inspect.
- `comparator` (Function, optional): The comparator invoked per element.

Returns `Array`.

```javascript
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
_.intersectionWith(objects, others, _.isEqual)
```

Result (list):

```json
[
  {
    "x": 1,
    "y": 2
  }
]
```

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

Converts all elements in `array` into a string separated by `separator`.

- `array` (Array): The array to convert.
- `separator` (string, optional, default ','): The element separator.

Returns `string`.

```javascript
_.join(['a', 'b', 'c'], '~')
```

Result (string):

```json
"a~b~c"
```

### `_.last(array)`

Gets the last element of `array`.

- `array` (Array): The array to query.

Returns `*`.

```javascript
_.last([1, 2, 3])
```

Result (number):

```json
3
```

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

This method is like `_.indexOf` except that it iterates over elements of
`array` from right to left.

- `array` (Array): The array to inspect.
- `value` (*): The value to search for.
- `fromIndex` (number, optional, default array.length-1): The index to search from.

Returns `number`.

```javascript
_.lastIndexOf([1, 2, 1, 2], 2)
```

Result (number):

```json
3
```

```javascript
_.lastIndexOf([1, 2, 1, 2], 2, 2)
```

Result (number):

```json
1
```

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

Gets the element at index `n` of `array`. If `n` is negative, the nth
element from the end is returned.

- `array` (Array): The array to query.
- `n` (number, optional, default 0): The index of the element to return.

Returns `*`.

```javascript
var array = ['a', 'b', 'c', 'd'];
_.nth(array, 1)
```

Result (string):

```json
"b"
```

```javascript
var array = ['a', 'b', 'c', 'd'];
_.nth(array, -2)
```

Result (string):

```json
"c"
```

### `_.pull(array, [values])`

Removes all given values from `array` using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons.

**Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
to remove elements from an array by predicate.

- `array` (Array): The array to modify.
- `values` (...*, optional): The values to remove.

Returns `Array`.

```javascript
var array = ['a', 'b', 'c', 'a', 'b', 'c'];
console.log(array)
```

Result (undefined):

```json
undefined
```

### `_.pullAll(array, values)`

This method is like `_.pull` except that it accepts an array of values to remove.

**Note:** Unlike `_.difference`, this method mutates `array`.

- `array` (Array): The array to modify.
- `values` (Array): The values to remove.

Returns `Array`.

```javascript
var array = ['a', 'b', 'c', 'a', 'b', 'c'];
console.log(array)
```

Result (undefined):

```json
undefined
```

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

This method is like `_.pullAll` except that it accepts `iteratee` which is
invoked for each element of `array` and `values` to generate the criterion
by which they're compared. The iteratee is invoked with one argument: (value).

**Note:** Unlike `_.differenceBy`, this method mutates `array`.

- `array` (Array): The array to modify.
- `values` (Array): The values to remove.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Array`.

```javascript
var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
console.log(array)
```

Result (undefined):

```json
undefined
```

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

This method is like `_.pullAll` except that it accepts `comparator` which
is invoked to compare elements of `array` to `values`. The comparator is
invoked with two arguments: (arrVal, othVal).

**Note:** Unlike `_.differenceWith`, this method mutates `array`.

- `array` (Array): The array to modify.
- `values` (Array): The values to remove.
- `comparator` (Function, optional): The comparator invoked per element.

Returns `Array`.

```javascript
var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
console.log(array)
```

Result (undefined):

```json
undefined
```

### `_.pullAt(array, [indexes])`

Removes elements from `array` corresponding to `indexes` and returns an
array of removed elements.

**Note:** Unlike `_.at`, this method mutates `array`.

- `array` (Array): The array to modify.
- `indexes` (...(number|number[]), optional): The indexes of elements to remove.

Returns `Array`.

```javascript
var array = ['a', 'b', 'c', 'd'];
var pulled = _.pullAt(array, [1, 3]);
console.log(array)
```

Result (undefined):

```json
undefined
```

```javascript
var array = ['a', 'b', 'c', 'd'];
var pulled = _.pullAt(array, [1, 3]);
console.log(pulled)
```

Result (undefined):

```json
undefined
```

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

Removes all elements from `array` that `predicate` returns truthy for
and returns an array of the removed elements. The predicate is invoked
with three arguments: (value, index, array).

**Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
to pull elements from an array by value.

- `array` (Array): The array to modify.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var array = [1, 2, 3, 4];
var evens = _.remove(array, function(n) {
  return n % 2 == 0;
});
console.log(array)
```

Result (undefined):

```json
undefined
```

```javascript
var array = [1, 2, 3, 4];
var evens = _.remove(array, function(n) {
  return n % 2 == 0;
});
console.log(evens)
```

Result (undefined):

```json
undefined
```

### `_.reverse(array)`

Reverses `array` so that the first element becomes the last, the second
element becomes the second to last, and so on.

**Note:** This method mutates `array` and is based on
[`Array#reverse`](https://mdn.io/Array/reverse).

- `array` (Array): The array to modify.

Returns `Array`.

```javascript
var array = [1, 2, 3];
_.reverse(array)
```

Result (list):

```json
[
  3,
  2,
  1
]
```

```javascript
var array = [1, 2, 3];
console.log(array)
```

Result (undefined):

```json
undefined
```

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

Creates a slice of `array` from `start` up to, but not including, `end`.

**Note:** This method is used instead of
[`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
returned.

- `array` (Array): The array to slice.
- `start` (number, optional, default 0): The start position.
- `end` (number, optional, default array.length): The end position.

Returns `Array`.

### `_.sortedIndex(array, value)`

Uses a binary search to determine the lowest index at which `value`
should be inserted into `array` in order to maintain its sort order.

- `array` (Array): The sorted array to inspect.
- `value` (*): The value to evaluate.

Returns `number`.

```javascript
_.sortedIndex([30, 50], 40)
```

Result (number):

```json
1
```

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

This method is like `_.sortedIndex` except that it accepts `iteratee`
which is invoked for `value` and each element of `array` to compute their
sort ranking. The iteratee is invoked with one argument: (value).

- `array` (Array): The sorted array to inspect.
- `value` (*): The value to evaluate.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `number`.

```javascript
var objects = [{ 'x': 4 }, { 'x': 5 }];
_.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; })
```

Result (number):

```json
0
```

```javascript
var objects = [{ 'x': 4 }, { 'x': 5 }];
_.sortedIndexBy(objects, { 'x': 4 }, 'x')
```

Result (number):

```json
0
```

### `_.sortedIndexOf(array, value)`

This method is like `_.indexOf` except that it performs a binary
search on a sorted `array`.

- `array` (Array): The array to inspect.
- `value` (*): The value to search for.

Returns `number`.

```javascript
_.sortedIndexOf([4, 5, 5, 5, 6], 5)
```

Result (number):

```json
1
```

### `_.sortedLastIndex(array, value)`

This method is like `_.sortedIndex` except that it returns the highest
index at which `value` should be inserted into `array` in order to
maintain its sort order.

- `array` (Array): The sorted array to inspect.
- `value` (*): The value to evaluate.

Returns `number`.

```javascript
_.sortedLastIndex([4, 5, 5, 5, 6], 5)
```

Result (number):

```json
4
```

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

This method is like `_.sortedLastIndex` except that it accepts `iteratee`
which is invoked for `value` and each element of `array` to compute their
sort ranking. The iteratee is invoked with one argument: (value).

- `array` (Array): The sorted array to inspect.
- `value` (*): The value to evaluate.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `number`.

```javascript
var objects = [{ 'x': 4 }, { 'x': 5 }];
_.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; })
```

Result (number):

```json
1
```

```javascript
var objects = [{ 'x': 4 }, { 'x': 5 }];
_.sortedLastIndexBy(objects, { 'x': 4 }, 'x')
```

Result (number):

```json
1
```

### `_.sortedLastIndexOf(array, value)`

This method is like `_.lastIndexOf` except that it performs a binary
search on a sorted `array`.

- `array` (Array): The array to inspect.
- `value` (*): The value to search for.

Returns `number`.

```javascript
_.sortedLastIndexOf([4, 5, 5, 5, 6], 5)
```

Result (number):

```json
3
```

### `_.sortedUniq(array)`

This method is like `_.uniq` except that it's designed and optimized
for sorted arrays.

- `array` (Array): The array to inspect.

Returns `Array`.

```javascript
_.sortedUniq([1, 1, 2])
```

Result (list):

```json
[
  1,
  2
]
```

### `_.sortedUniqBy(array, [iteratee])`

This method is like `_.uniqBy` except that it's designed and optimized
for sorted arrays.

- `array` (Array): The array to inspect.
- `iteratee` (Function, optional): The iteratee invoked per element.

Returns `Array`.

```javascript
_.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor)
```

Result (list):

```json
[
  1.1,
  2.3
]
```

### `_.tail(array)`

Gets all but the first element of `array`.

- `array` (Array): The array to query.

Returns `Array`.

```javascript
_.tail([1, 2, 3])
```

Result (list):

```json
[
  2,
  3
]
```

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

Creates a slice of `array` with `n` elements taken from the beginning.

- `array` (Array): The array to query.
- `n` (number, optional, default 1): The number of elements to take.

Returns `Array`.

```javascript
_.take([1, 2, 3])
```

Result (list):

```json
[
  1
]
```

```javascript
_.take([1, 2, 3], 2)
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
_.take([1, 2, 3], 5)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
_.take([1, 2, 3], 0)
```

Result (list):

```json
[]
```

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

Creates a slice of `array` with `n` elements taken from the end.

- `array` (Array): The array to query.
- `n` (number, optional, default 1): The number of elements to take.

Returns `Array`.

```javascript
_.takeRight([1, 2, 3])
```

Result (list):

```json
[
  3
]
```

```javascript
_.takeRight([1, 2, 3], 2)
```

Result (list):

```json
[
  2,
  3
]
```

```javascript
_.takeRight([1, 2, 3], 5)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
_.takeRight([1, 2, 3], 0)
```

Result (list):

```json
[]
```

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

Creates a slice of `array` with elements taken from the end. Elements are
taken until `predicate` returns falsey. The predicate is invoked with
three arguments: (value, index, array).

- `array` (Array): The array to query.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.takeRightWhile(users, function(o) { return !o.active; })
```

Result (list):

```json
[
  {
    "user": "fred",
    "active": false
  },
  {
    "user": "pebbles",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.takeRightWhile(users, { 'user': 'pebbles', 'active': false })
```

Result (list):

```json
[
  {
    "user": "pebbles",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.takeRightWhile(users, ['active', false])
```

Result (list):

```json
[
  {
    "user": "fred",
    "active": false
  },
  {
    "user": "pebbles",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': true },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': false }
];
_.takeRightWhile(users, 'active')
```

Result (list):

```json
[]
```

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

Creates a slice of `array` with elements taken from the beginning. Elements
are taken until `predicate` returns falsey. The predicate is invoked with
three arguments: (value, index, array).

- `array` (Array): The array to query.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.takeWhile(users, function(o) { return !o.active; })
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": false
  },
  {
    "user": "fred",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.takeWhile(users, { 'user': 'barney', 'active': false })
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.takeWhile(users, ['active', false])
```

Result (list):

```json
[
  {
    "user": "barney",
    "active": false
  },
  {
    "user": "fred",
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney',  'active': false },
  { 'user': 'fred',    'active': false },
  { 'user': 'pebbles', 'active': true }
];
_.takeWhile(users, 'active')
```

Result (list):

```json
[]
```

### `_.union([arrays])`

Creates an array of unique values, in order, from all given arrays using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons.

- `arrays` (...Array, optional): The arrays to inspect.

Returns `Array`.

```javascript
_.union([2], [1, 2])
```

Result (list):

```json
[
  2,
  1
]
```

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

This method is like `_.union` except that it accepts `iteratee` which is
invoked for each element of each `arrays` to generate the criterion by
which uniqueness is computed. Result values are chosen from the first
array in which the value occurs. The iteratee is invoked with one argument:
(value).

- `arrays` (...Array, optional): The arrays to inspect.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Array`.

```javascript
_.unionBy([2.1], [1.2, 2.3], Math.floor)
```

Result (list):

```json
[
  2.1,
  1.2
]
```

```javascript
_.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x')
```

Result (list):

```json
[
  {
    "x": 1
  },
  {
    "x": 2
  }
]
```

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

This method is like `_.union` except that it accepts `comparator` which
is invoked to compare elements of `arrays`. Result values are chosen from
the first array in which the value occurs. The comparator is invoked
with two arguments: (arrVal, othVal).

- `arrays` (...Array, optional): The arrays to inspect.
- `comparator` (Function, optional): The comparator invoked per element.

Returns `Array`.

```javascript
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
_.unionWith(objects, others, _.isEqual)
```

Result (list):

```json
[
  {
    "x": 1,
    "y": 2
  },
  {
    "x": 2,
    "y": 1
  },
  {
    "x": 1,
    "y": 1
  }
]
```

### `_.uniq(array)`

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. The order of result values is determined by the order they occur
in the array.

- `array` (Array): The array to inspect.

Returns `Array`.

```javascript
_.uniq([2, 1, 2])
```

Result (list):

```json
[
  2,
  1
]
```

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

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 order of result values is determined by the
order they occur in the array. The iteratee is invoked with one argument:
(value).

- `array` (Array): The array to inspect.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Array`.

```javascript
_.uniqBy([2.1, 1.2, 2.3], Math.floor)
```

Result (list):

```json
[
  2.1,
  1.2
]
```

```javascript
_.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x')
```

Result (list):

```json
[
  {
    "x": 1
  },
  {
    "x": 2
  }
]
```

### `_.uniqWith(array, [comparator])`

This method is like `_.uniq` except that it accepts `comparator` which
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).

- `array` (Array): The array to inspect.
- `comparator` (Function, optional): The comparator invoked per element.

Returns `Array`.

```javascript
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
_.uniqWith(objects, _.isEqual)
```

Result (list):

```json
[
  {
    "x": 1,
    "y": 2
  },
  {
    "x": 2,
    "y": 1
  }
]
```

### `_.unzip(array)`

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
configuration.

- `array` (Array): The array of grouped elements to process.

Returns `Array`.

```javascript
var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
_.unzip(zipped)
```

Result (list):

```json
[
  [
    "a",
    "b"
  ],
  [
    1,
    2
  ],
  [
    true,
    false
  ]
]
```

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

This method is like `_.unzip` except that it accepts `iteratee` to specify
how regrouped values should be combined. The iteratee is invoked with the
elements of each group: (...group).

- `array` (Array): The array of grouped elements to process.
- `iteratee` (Function, optional, default _.identity): The function to combine
 regrouped values.

Returns `Array`.

```javascript
var zipped = _.zip([1, 2], [10, 20], [100, 200]);
_.unzipWith(zipped, _.add)
```

Result (list):

```json
[
  3,
  30,
  300
]
```

### `_.without(array, [values])`

Creates an array excluding all given values using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons.

**Note:** Unlike `_.pull`, this method returns a new array.

- `array` (Array): The array to inspect.
- `values` (...*, optional): The values to exclude.

Returns `Array`.

```javascript
_.without([2, 1, 2, 3], 1, 2)
```

Result (list):

```json
[
  3
]
```

### `_.xor([arrays])`

Creates an array of unique values that is the
[symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
of the given arrays. The order of result values is determined by the order
they occur in the arrays.

- `arrays` (...Array, optional): The arrays to inspect.

Returns `Array`.

```javascript
_.xor([2, 1], [2, 3])
```

Result (list):

```json
[
  1,
  3
]
```

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

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 order of result values is determined
by the order they occur in the arrays. The iteratee is invoked with one
argument: (value).

- `arrays` (...Array, optional): The arrays to inspect.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Array`.

```javascript
_.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor)
```

Result (list):

```json
[
  1.2,
  3.4
]
```

```javascript
_.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x')
```

Result (list):

```json
[
  {
    "x": 2
  }
]
```

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

This method is like `_.xor` except that it accepts `comparator` which is
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).

- `arrays` (...Array, optional): The arrays to inspect.
- `comparator` (Function, optional): The comparator invoked per element.

Returns `Array`.

```javascript
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
_.xorWith(objects, others, _.isEqual)
```

Result (list):

```json
[
  {
    "x": 2,
    "y": 1
  },
  {
    "x": 1,
    "y": 1
  }
]
```

### `_.zip([arrays])`

Creates an array of grouped elements, the first of which contains the
first elements of the given arrays, the second of which contains the
second elements of the given arrays, and so on.

- `arrays` (...Array, optional): The arrays to process.

Returns `Array`.

```javascript
_.zip(['a', 'b'], [1, 2], [true, false])
```

Result (list):

```json
[
  [
    "a",
    1,
    true
  ],
  [
    "b",
    2,
    false
  ]
]
```

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

This method is like `_.fromPairs` except that it accepts two arrays,
one of property identifiers and one of corresponding values.

- `props` (Array, optional, default [): ] The property identifiers.
- `values` (Array, optional, default [): ] The property values.

Returns `Object`.

```javascript
_.zipObject(['a', 'b'], [1, 2])
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

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

This method is like `_.zipObject` except that it supports property paths.

- `props` (Array, optional, default [): ] The property identifiers.
- `values` (Array, optional, default [): ] The property values.

Returns `Object`.

```javascript
_.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2])
```

Result (object):

```json
{
  "a": {
    "b": [
      {
        "c": 1
      },
      {
        "d": 2
      }
    ]
  }
}
```

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

This method is like `_.zip` except that it accepts `iteratee` to specify
how grouped values should be combined. The iteratee is invoked with the
elements of each group: (...group).

- `arrays` (...Array, optional): The arrays to process.
- `iteratee` (Function, optional, default _.identity): The function to combine
 grouped values.

Returns `Array`.

```javascript
_.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  return a + b + c;
})
```

Result (list):

```json
[
  111,
  222
]
```

## Collection

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

Creates an object composed of keys generated from the results of running
each element of `collection` thru `iteratee`. The corresponding value of
each key is the number of times the key was returned by `iteratee`. The
iteratee is invoked with one argument: (value).

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee to transform keys.

Returns `Object`.

```javascript
_.countBy([6.1, 4.2, 6.3], Math.floor)
```

Result (object):

```json
{
  "4": 1,
  "6": 2
}
```

```javascript
_.countBy(['one', 'two', 'three'], 'length')
```

Result (object):

```json
{
  "3": 2,
  "5": 1
}
```

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

Checks if `predicate` returns truthy for **all** elements of `collection`.
Iteration is stopped once `predicate` returns falsey. The predicate is
invoked with three arguments: (value, index|key, collection).

**Note:** This method returns `true` for
[empty collections](https://en.wikipedia.org/wiki/Empty_set) because
[everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
elements of empty collections.

- `collection` (Array|Object): The collection to iterate over.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `boolean`.

```javascript
_.every([true, 1, null, 'yes'], Boolean)
```

Result (boolean):

```json
false
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.every(users, { 'user': 'barney', 'active': false })
```

Result (boolean):

```json
false
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.every(users, ['active', false])
```

Result (boolean):

```json
true
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.every(users, 'active')
```

Result (boolean):

```json
false
```

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

Iterates over elements of `collection`, returning an array of all elements
`predicate` returns truthy for. The predicate is invoked with three
arguments: (value, index|key, collection).

**Note:** Unlike `_.remove`, this method returns a new array.

- `collection` (Array|Object): The collection to iterate over.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(users, function(o) { return !o.active; })
```

Result (list):

```json
[
  {
    "user": "fred",
    "age": 40,
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(users, { 'age': 36, 'active': true })
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36,
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(users, ['active', false])
```

Result (list):

```json
[
  {
    "user": "fred",
    "age": 40,
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(users, 'active')
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36,
    "active": true
  }
]
```

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

Iterates over elements of `collection`, returning the first element
`predicate` returns truthy for. The predicate is invoked with three
arguments: (value, index|key, collection).

- `collection` (Array|Object): The collection to inspect.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.
- `fromIndex` (number, optional, default 0): The index to search from.

Returns `*`.

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': true },
  { 'user': 'fred',    'age': 40, 'active': false },
  { 'user': 'pebbles', 'age': 1,  'active': true }
];
_.find(users, function(o) { return o.age < 40; })
```

Result (object):

```json
{
  "user": "barney",
  "age": 36,
  "active": true
}
```

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': true },
  { 'user': 'fred',    'age': 40, 'active': false },
  { 'user': 'pebbles', 'age': 1,  'active': true }
];
_.find(users, { 'age': 1, 'active': true })
```

Result (object):

```json
{
  "user": "pebbles",
  "age": 1,
  "active": true
}
```

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': true },
  { 'user': 'fred',    'age': 40, 'active': false },
  { 'user': 'pebbles', 'age': 1,  'active': true }
];
_.find(users, ['active', false])
```

Result (object):

```json
{
  "user": "fred",
  "age": 40,
  "active": false
}
```

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': true },
  { 'user': 'fred',    'age': 40, 'active': false },
  { 'user': 'pebbles', 'age': 1,  'active': true }
];
_.find(users, 'active')
```

Result (object):

```json
{
  "user": "barney",
  "age": 36,
  "active": true
}
```

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

This method is like `_.find` except that it iterates over elements of
`collection` from right to left.

- `collection` (Array|Object): The collection to inspect.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.
- `fromIndex` (number, optional, default collection.length-1): The index to search from.

Returns `*`.

```javascript
_.findLast([1, 2, 3, 4], function(n) {
  return n % 2 == 1;
})
```

Result (number):

```json
3
```

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

Creates a flattened array of values by running each element in `collection`
thru `iteratee` and flattening the mapped results. The iteratee is invoked
with three arguments: (value, index|key, collection).

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
function duplicate(n) {
  return [n, n];
};
_.flatMap([1, 2], duplicate)
```

Result (list):

```json
[
  1,
  1,
  2,
  2
]
```

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

This method is like `_.flatMap` except that it recursively flattens the
mapped results.

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
function duplicate(n) {
  return [[[n, n]]];
};
_.flatMapDeep([1, 2], duplicate)
```

Result (list):

```json
[
  1,
  1,
  2,
  2
]
```

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

This method is like `_.flatMap` except that it recursively flattens the
mapped results up to `depth` times.

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.
- `depth` (number, optional, default 1): The maximum recursion depth.

Returns `Array`.

```javascript
function duplicate(n) {
  return [[[n, n]]];
};
_.flatMapDepth([1, 2], duplicate, 2)
```

Result (list):

```json
[
  [
    1,
    1
  ],
  [
    2,
    2
  ]
]
```

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

Iterates over elements of `collection` and invokes `iteratee` for each element.
The iteratee is invoked with three arguments: (value, index|key, collection).
Iteratee functions may exit iteration early by explicitly returning `false`.

**Note:** As with other "Collections" methods, objects with a "length"
property are iterated like arrays. To avoid this behavior use `_.forIn`
or `_.forOwn` for object iteration.

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array|Object`.

```javascript
_.forEach([1, 2], function(value) {
  console.log(value);
})
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
_.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  console.log(key);
})
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

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

This method is like `_.forEach` except that it iterates over elements of
`collection` from right to left.

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array|Object`.

```javascript
_.forEachRight([1, 2], function(value) {
  console.log(value);
})
```

Result (list):

```json
[
  1,
  2
]
```

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

Creates an object composed of keys generated from the results of running
each element of `collection` thru `iteratee`. The order of grouped values
is determined by the order they occur in `collection`. The corresponding
value of each key is an array of elements responsible for generating the
key. The iteratee is invoked with one argument: (value).

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee to transform keys.

Returns `Object`.

```javascript
_.groupBy([6.1, 4.2, 6.3], Math.floor)
```

Result (object):

```json
{
  "4": [
    4.2
  ],
  "6": [
    6.1,
    6.3
  ]
}
```

```javascript
_.groupBy(['one', 'two', 'three'], 'length')
```

Result (object):

```json
{
  "3": [
    "one",
    "two"
  ],
  "5": [
    "three"
  ]
}
```

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

Checks if `value` is in `collection`. If `collection` is a string, it's
checked for a substring of `value`, otherwise
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
is used for equality comparisons. If `fromIndex` is negative, it's used as
the offset from the end of `collection`.

- `collection` (Array|Object|string): The collection to inspect.
- `value` (*): The value to search for.
- `fromIndex` (number, optional, default 0): The index to search from.

Returns `boolean`.

```javascript
_.includes([1, 2, 3], 1)
```

Result (boolean):

```json
true
```

```javascript
_.includes([1, 2, 3], 1, 2)
```

Result (boolean):

```json
false
```

```javascript
_.includes({ 'a': 1, 'b': 2 }, 1)
```

Result (boolean):

```json
true
```

```javascript
_.includes('abcd', 'bc')
```

Result (boolean):

```json
true
```

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

Invokes the method at `path` of each element in `collection`, returning
an array of the results of each invoked method. Any additional arguments
are provided to each invoked method. If `path` is a function, it's invoked
for, and `this` bound to, each element in `collection`.

- `collection` (Array|Object): The collection to iterate over.
- `path` (Array|Function|string): The path of the method to invoke or
 the function invoked per iteration.
- `args` (...*, optional): The arguments to invoke each method with.

Returns `Array`.

```javascript
_.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort')
```

Result (list):

```json
[
  [
    1,
    5,
    7
  ],
  [
    1,
    2,
    3
  ]
]
```

```javascript
_.invokeMap([123, 456], String.prototype.split, '')
```

Result (list):

```json
[
  [
    "1",
    "2",
    "3"
  ],
  [
    "4",
    "5",
    "6"
  ]
]
```

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

Creates an object composed of keys generated from the results of running
each element of `collection` thru `iteratee`. The corresponding value of
each key is the last element responsible for generating the key. The
iteratee is invoked with one argument: (value).

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee to transform keys.

Returns `Object`.

```javascript
var array = [
  { 'dir': 'left', 'code': 97 },
  { 'dir': 'right', 'code': 100 }
];
_.keyBy(array, function(o) {
  return String.fromCharCode(o.code);
})
```

Result (object):

```json
{
  "a": {
    "dir": "left",
    "code": 97
  },
  "d": {
    "dir": "right",
    "code": 100
  }
}
```

```javascript
var array = [
  { 'dir': 'left', 'code': 97 },
  { 'dir': 'right', 'code': 100 }
];
_.keyBy(array, 'dir')
```

Result (object):

```json
{
  "left": {
    "dir": "left",
    "code": 97
  },
  "right": {
    "dir": "right",
    "code": 100
  }
}
```

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

Creates an array of values by running each element in `collection` thru
`iteratee`. The iteratee is invoked with three arguments:
(value, index|key, collection).

Many lodash methods are guarded to work as iteratees for methods like
`_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.

The guarded methods are:
`ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
`fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
`sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
`template`, `trim`, `trimEnd`, `trimStart`, and `words`

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
function square(n) {
  return n * n;
};
_.map([4, 8], square)
```

Result (list):

```json
[
  16,
  64
]
```

```javascript
function square(n) {
  return n * n;
};
_.map({ 'a': 4, 'b': 8 }, square)
```

Result (list):

```json
[
  16,
  64
]
```

```javascript
function square(n) {
  return n * n;
};
var users = [
  { 'user': 'barney' },
  { 'user': 'fred' }
];
_.map(users, 'user')
```

Result (list):

```json
[
  "barney",
  "fred"
]
```

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

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
are sorted in ascending order. Otherwise, specify an order of "desc" for
descending or "asc" for ascending sort order of corresponding values.

- `collection` (Array|Object): The collection to iterate over.
- `iteratees` (Array[]|Function[]|Object[]|string[], optional, default [_.identity): ]
 The iteratees to sort by.
- `orders` (string[], optional): The sort orders of `iteratees`.

Returns `Array`.

```javascript
var users = [
  { 'user': 'fred',   'age': 48 },
  { 'user': 'barney', 'age': 34 },
  { 'user': 'fred',   'age': 40 },
  { 'user': 'barney', 'age': 36 }
];
_.orderBy(users, ['user', 'age'], ['asc', 'desc'])
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36
  },
  {
    "user": "barney",
    "age": 34
  },
  {
    "user": "fred",
    "age": 48
  },
  {
    "user": "fred",
    "age": 40
  }
]
```

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

Creates an array of elements split into two groups, the first of which
contains elements `predicate` returns truthy for, the second of which
contains elements `predicate` returns falsey for. The predicate is
invoked with one argument: (value).

- `collection` (Array|Object): The collection to iterate over.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': false },
  { 'user': 'fred',    'age': 40, 'active': true },
  { 'user': 'pebbles', 'age': 1,  'active': false }
];
_.partition(users, function(o) { return o.active; })
```

Result (list):

```json
[
  [
    {
      "user": "fred",
      "age": 40,
      "active": true
    }
  ],
  [
    {
      "user": "barney",
      "age": 36,
      "active": false
    },
    {
      "user": "pebbles",
      "age": 1,
      "active": false
    }
  ]
]
```

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': false },
  { 'user': 'fred',    'age': 40, 'active': true },
  { 'user': 'pebbles', 'age': 1,  'active': false }
];
_.partition(users, { 'age': 1, 'active': false })
```

Result (list):

```json
[
  [
    {
      "user": "pebbles",
      "age": 1,
      "active": false
    }
  ],
  [
    {
      "user": "barney",
      "age": 36,
      "active": false
    },
    {
      "user": "fred",
      "age": 40,
      "active": true
    }
  ]
]
```

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': false },
  { 'user': 'fred',    'age': 40, 'active': true },
  { 'user': 'pebbles', 'age': 1,  'active': false }
];
_.partition(users, ['active', false])
```

Result (list):

```json
[
  [
    {
      "user": "barney",
      "age": 36,
      "active": false
    },
    {
      "user": "pebbles",
      "age": 1,
      "active": false
    }
  ],
  [
    {
      "user": "fred",
      "age": 40,
      "active": true
    }
  ]
]
```

```javascript
var users = [
  { 'user': 'barney',  'age': 36, 'active': false },
  { 'user': 'fred',    'age': 40, 'active': true },
  { 'user': 'pebbles', 'age': 1,  'active': false }
];
_.partition(users, 'active')
```

Result (list):

```json
[
  [
    {
      "user": "fred",
      "age": 40,
      "active": true
    }
  ],
  [
    {
      "user": "barney",
      "age": 36,
      "active": false
    },
    {
      "user": "pebbles",
      "age": 1,
      "active": false
    }
  ]
]
```

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

Reduces `collection` to a value which is the accumulated result of running
each element in `collection` thru `iteratee`, where each successive
invocation is supplied the return value of the previous. If `accumulator`
is not given, the first element of `collection` is used as the initial
value. The iteratee is invoked with four arguments:
(accumulator, value, index|key, collection).

Many lodash methods are guarded to work as iteratees for methods like
`_.reduce`, `_.reduceRight`, and `_.transform`.

The guarded methods are:
`assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
and `sortBy`

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.
- `accumulator` (*, optional): The initial value.

Returns `*`.

```javascript
_.reduce([1, 2], function(sum, n) {
  return sum + n;
}, 0)
```

Result (number):

```json
3
```

```javascript
_.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  (result[value] || (result[value] = [])).push(key);
  return result;
}, {})
```

Result (object):

```json
{
  "1": [
    "a",
    "c"
  ],
  "2": [
    "b"
  ]
}
```

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

This method is like `_.reduce` except that it iterates over elements of
`collection` from right to left.

- `collection` (Array|Object): The collection to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.
- `accumulator` (*, optional): The initial value.

Returns `*`.

```javascript
var array = [[0, 1], [2, 3], [4, 5]];
_.reduceRight(array, function(flattened, other) {
  return flattened.concat(other);
}, [])
```

Result (list):

```json
[
  4,
  5,
  2,
  3,
  0,
  1
]
```

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

The opposite of `_.filter`; this method returns the elements of `collection`
that `predicate` does **not** return truthy for.

- `collection` (Array|Object): The collection to iterate over.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': true }
];
_.reject(users, function(o) { return !o.active; })
```

Result (list):

```json
[
  {
    "user": "fred",
    "age": 40,
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': true }
];
_.reject(users, { 'age': 40, 'active': true })
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36,
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': true }
];
_.reject(users, ['active', false])
```

Result (list):

```json
[
  {
    "user": "fred",
    "age": 40,
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': false },
  { 'user': 'fred',   'age': 40, 'active': true }
];
_.reject(users, 'active')
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36,
    "active": false
  }
]
```

### `_.sample(collection)`

Gets a random element from `collection`.

- `collection` (Array|Object): The collection to sample.

Returns `*`.

```javascript
_.sample([1, 2, 3, 4])
```

Result (number):

```json
3
```

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

Gets `n` random elements at unique keys from `collection` up to the
size of `collection`.

- `collection` (Array|Object): The collection to sample.
- `n` (number, optional, default 1): The number of elements to sample.

Returns `Array`.

```javascript
_.sampleSize([1, 2, 3], 2)
```

Result (list):

```json
[
  3,
  2
]
```

```javascript
_.sampleSize([1, 2, 3], 4)
```

Result (list):

```json
[
  2,
  3,
  1
]
```

### `_.shuffle(collection)`

Creates an array of shuffled values, using a version of the
[Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).

- `collection` (Array|Object): The collection to shuffle.

Returns `Array`.

```javascript
_.shuffle([1, 2, 3, 4])
```

Result (list):

```json
[
  2,
  1,
  3,
  4
]
```

### `_.size(collection)`

Gets the size of `collection` by returning its length for array-like
values or the number of own enumerable string keyed properties for objects.

- `collection` (Array|Object|string): The collection to inspect.

Returns `number`.

```javascript
_.size([1, 2, 3])
```

Result (number):

```json
3
```

```javascript
_.size({ 'a': 1, 'b': 2 })
```

Result (number):

```json
2
```

```javascript
_.size('pebbles')
```

Result (number):

```json
7
```

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

Checks if `predicate` returns truthy for **any** element of `collection`.
Iteration is stopped once `predicate` returns truthy. The predicate is
invoked with three arguments: (value, index|key, collection).

- `collection` (Array|Object): The collection to iterate over.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `boolean`.

```javascript
_.some([null, 0, 'yes', false], Boolean)
```

Result (boolean):

```json
true
```

```javascript
var users = [
  { 'user': 'barney', 'active': true },
  { 'user': 'fred',   'active': false }
];
_.some(users, { 'user': 'barney', 'active': false })
```

Result (boolean):

```json
false
```

```javascript
var users = [
  { 'user': 'barney', 'active': true },
  { 'user': 'fred',   'active': false }
];
_.some(users, ['active', false])
```

Result (boolean):

```json
true
```

```javascript
var users = [
  { 'user': 'barney', 'active': true },
  { 'user': 'fred',   'active': false }
];
_.some(users, 'active')
```

Result (boolean):

```json
true
```

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

Creates an array of elements, sorted in ascending order by the results of
running each element in a collection thru each iteratee. This method
performs a stable sort, that is, it preserves the original sort order of
equal elements. The iteratees are invoked with one argument: (value).

- `collection` (Array|Object): The collection to iterate over.
- `iteratees` (...(Function|Function[]), optional, default [_.identity): ]
 The iteratees to sort by.

Returns `Array`.

```javascript
var users = [
  { 'user': 'fred',   'age': 48 },
  { 'user': 'barney', 'age': 36 },
  { 'user': 'fred',   'age': 30 },
  { 'user': 'barney', 'age': 34 }
];
_.sortBy(users, [function(o) { return o.user; }])
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36
  },
  {
    "user": "barney",
    "age": 34
  },
  {
    "user": "fred",
    "age": 48
  },
  {
    "user": "fred",
    "age": 30
  }
]
```

```javascript
var users = [
  { 'user': 'fred',   'age': 48 },
  { 'user': 'barney', 'age': 36 },
  { 'user': 'fred',   'age': 30 },
  { 'user': 'barney', 'age': 34 }
];
_.sortBy(users, ['user', 'age'])
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 34
  },
  {
    "user": "barney",
    "age": 36
  },
  {
    "user": "fred",
    "age": 30
  },
  {
    "user": "fred",
    "age": 48
  }
]
```

## Date

### `_.now()`

Gets the timestamp of the number of milliseconds that have elapsed since
the Unix epoch (1 January 1970 00:00:00 UTC).

Returns `number`.

```javascript
_.defer(function(stamp) {
  console.log(_.now() - stamp);
}, _.now())
```

Result (object):

```json
"[Timeout]"
```

## Function

### `_.after(n, func)`

The opposite of `_.before`; this method creates a function that invokes
`func` once it's called `n` or more times.

- `n` (number): The number of calls before `func` is invoked.
- `func` (Function): The function to restrict.

Returns `Function`.

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

Creates a function that invokes `func`, with up to `n` arguments,
ignoring any additional arguments.

- `func` (Function): The function to cap arguments for.
- `n` (number, optional, default func.length): The arity cap.

Returns `Function`.

```javascript
_.map(['6', '8', '10'], _.ary(parseInt, 1))
```

Result (list):

```json
[
  6,
  8,
  10
]
```

### `_.before(n, func)`

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
calls to the created function return the result of the last `func` invocation.

- `n` (number): The number of calls at which `func` is no longer invoked.
- `func` (Function): The function to restrict.

Returns `Function`.

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

Creates a function that invokes `func` with the `this` binding of `thisArg`
and `partials` prepended to the arguments it receives.

The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
may be used as a placeholder for partially applied arguments.

**Note:** Unlike native `Function#bind`, this method doesn't set the "length"
property of bound functions.

- `func` (Function): The function to bind.
- `thisArg` (*): The `this` binding of `func`.
- `partials` (...*, optional): The arguments to be partially applied.

Returns `Function`.

```javascript
function greet(greeting, punctuation) {
  return greeting + ' ' + this.user + punctuation;
};
var object = { 'user': 'fred' };
var bound = _.bind(greet, object, 'hi');
bound('!')
```

Result (string):

```json
"hi fred!"
```

```javascript
function greet(greeting, punctuation) {
  return greeting + ' ' + this.user + punctuation;
};
var object = { 'user': 'fred' };
var bound = _.bind(greet, object, 'hi');
var bound = _.bind(greet, object, _, '!');
bound('hi')
```

Result (string):

```json
"hi fred!"
```

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

Creates a function that invokes the method at `object[key]` with `partials`
prepended to the arguments it receives.

This method differs from `_.bind` by allowing bound functions to reference
methods that may be redefined or don't yet exist. See
[Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
for more details.

The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments.

- `object` (Object): The object to invoke the method on.
- `key` (string): The key of the method.
- `partials` (...*, optional): The arguments to be partially applied.

Returns `Function`.

```javascript
var object = {
  'user': 'fred',
  'greet': function(greeting, punctuation) {
    return greeting + ' ' + this.user + punctuation;
  }
};
var bound = _.bindKey(object, 'greet', 'hi');
bound('!')
```

Result (string):

```json
"hi fred!"
```

```javascript
var object = {
  'user': 'fred',
  'greet': function(greeting, punctuation) {
    return greeting + ' ' + this.user + punctuation;
  }
};
var bound = _.bindKey(object, 'greet', 'hi');
bound('!')
```

Result (string):

```json
"hi fred!"
```

```javascript
var object = {
  'user': 'fred',
  'greet': function(greeting, punctuation) {
    return greeting + ' ' + this.user + punctuation;
  }
};
var bound = _.bindKey(object, 'greet', 'hi');
var bound = _.bindKey(object, 'greet', _, '!');
bound('hi')
```

Result (string):

```json
"hi fred!"
```

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

Creates a function that accepts arguments of `func` and either invokes
`func` returning its result, if at least `arity` number of arguments have
been provided, or returns a function that accepts the remaining `func`
arguments, and so on. The arity of `func` may be specified if `func.length`
is not sufficient.

The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
may be used as a placeholder for provided arguments.

**Note:** This method doesn't set the "length" property of curried functions.

- `func` (Function): The function to curry.
- `arity` (number, optional, default func.length): The arity of `func`.

Returns `Function`.

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curry(abc);
curried(1)(2)(3)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curry(abc);
curried(1, 2)(3)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curry(abc);
curried(1, 2, 3)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curry(abc);
curried(1)(_, 3)(2)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

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

This method is like `_.curry` except that arguments are applied to `func`
in the manner of `_.partialRight` instead of `_.partial`.

The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for provided arguments.

**Note:** This method doesn't set the "length" property of curried functions.

- `func` (Function): The function to curry.
- `arity` (number, optional, default func.length): The arity of `func`.

Returns `Function`.

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curryRight(abc);
curried(3)(2)(1)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curryRight(abc);
curried(2, 3)(1)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curryRight(abc);
curried(1, 2, 3)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

```javascript
var abc = function(a, b, c) {
  return [a, b, c];
};
var curried = _.curryRight(abc);
curried(3)(1, _)(2)
```

Result (list):

```json
[
  1,
  2,
  3
]
```

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

Creates a debounced function that delays invoking `func` until after `wait`
milliseconds have elapsed since the last time the debounced function was
invoked. The debounced function comes with a `cancel` method to cancel
delayed `func` invocations and a `flush` method to immediately invoke them.
Provide `options` to indicate whether `func` should be invoked on the
leading and/or trailing edge of the `wait` timeout. The `func` is invoked
with the last arguments provided to the debounced function. Subsequent
calls to the debounced function return the result of the last `func`
invocation.

**Note:** If `leading` and `trailing` options are `true`, `func` is
invoked on the trailing edge of the timeout only if the debounced function
is invoked more than once during the `wait` timeout.

If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
until to the next tick, similar to `setTimeout` with a timeout of `0`.

See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
for details over the differences between `_.debounce` and `_.throttle`.

- `func` (Function): The function to debounce.
- `wait` (number, optional, default 0): The number of milliseconds to delay.
- `options` (Object, optional, default {}): The options object.
- `options.leading` (boolean, optional, default false): Specify invoking on the leading edge of the timeout.
- `options.maxWait` (number, optional): The maximum time `func` is allowed to be delayed before it's invoked.
- `options.trailing` (boolean, optional, default true): Specify invoking on the trailing edge of the timeout.

Returns `Function`.

### `_.defer(func, [args])`

Defers invoking the `func` until the current call stack has cleared. Any
additional arguments are provided to `func` when it's invoked.

- `func` (Function): The function to defer.
- `args` (...*, optional): The arguments to invoke `func` with.

Returns `number`.

```javascript
_.defer(function(text) {
  console.log(text);
}, 'deferred')
```

Result (object):

```json
"[Timeout]"
```

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

Invokes `func` after `wait` milliseconds. Any additional arguments are
provided to `func` when it's invoked.

- `func` (Function): The function to delay.
- `wait` (number): The number of milliseconds to delay invocation.
- `args` (...*, optional): The arguments to invoke `func` with.

Returns `number`.

```javascript
_.delay(function(text) {
  console.log(text);
}, 1000, 'later')
```

Result (object):

```json
"[Timeout]"
```

### `_.flip(func)`

Creates a function that invokes `func` with arguments reversed.

- `func` (Function): The function to flip arguments for.

Returns `Function`.

```javascript
var flipped = _.flip(function() {
  return _.toArray(arguments);
});
flipped('a', 'b', 'c', 'd')
```

Result (list):

```json
[
  "d",
  "c",
  "b",
  "a"
]
```

### `_.memoize(func, [resolver])`

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
arguments provided to the memoized function. By default, the first argument
provided to the memoized function is used as the map cache key. The `func`
is invoked with the `this` binding of the memoized function.

**Note:** The cache is exposed as the `cache` property on the memoized
function. Its creation may be customized by replacing the `_.memoize.Cache`
constructor with one whose instances implement the
[`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
method interface of `clear`, `delete`, `get`, `has`, and `set`.

- `func` (Function): The function to have its output memoized.
- `resolver` (Function, optional): The function to resolve the cache key.

Returns `Function`.

```javascript
var object = { 'a': 1, 'b': 2 };
var other = { 'c': 3, 'd': 4 };
var values = _.memoize(_.values);
values(object)
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
var object = { 'a': 1, 'b': 2 };
var other = { 'c': 3, 'd': 4 };
var values = _.memoize(_.values);
values(other)
```

Result (list):

```json
[
  3,
  4
]
```

```javascript
var object = { 'a': 1, 'b': 2 };
var other = { 'c': 3, 'd': 4 };
var values = _.memoize(_.values);
values(object)
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
var object = { 'a': 1, 'b': 2 };
var other = { 'c': 3, 'd': 4 };
var values = _.memoize(_.values);
values(object)
```

Result (list):

```json
[
  1,
  2
]
```

### `_.negate(predicate)`

Creates a function that negates the result of the predicate `func`. The
`func` predicate is invoked with the `this` binding and arguments of the
created function.

- `predicate` (Function): The predicate to negate.

Returns `Function`.

```javascript
function isEven(n) {
  return n % 2 == 0;
};
_.filter([1, 2, 3, 4, 5, 6], _.negate(isEven))
```

Result (list):

```json
[
  1,
  3,
  5
]
```

### `_.once(func)`

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
invoked with the `this` binding and arguments of the created function.

- `func` (Function): The function to restrict.

Returns `Function`.

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

Creates a function that invokes `func` with its arguments transformed.

- `func` (Function): The function to wrap.
- `transforms` (...(Function|Function[]), optional, default [_.identity): ]
 The argument transforms.

Returns `Function`.

```javascript
function doubled(n) {
  return n * 2;
};
function square(n) {
  return n * n;
};
var func = _.overArgs(function(x, y) {
  return [x, y];
}, [square, doubled]);
func(9, 3)
```

Result (list):

```json
[
  81,
  6
]
```

```javascript
function doubled(n) {
  return n * 2;
};
function square(n) {
  return n * n;
};
var func = _.overArgs(function(x, y) {
  return [x, y];
}, [square, doubled]);
func(10, 5)
```

Result (list):

```json
[
  100,
  10
]
```

### `_.partial(func, [partials])`

Creates a function that invokes `func` with `partials` prepended to the
arguments it receives. This method is like `_.bind` except it does **not**
alter the `this` binding.

The `_.partial.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments.

**Note:** This method doesn't set the "length" property of partially
applied functions.

- `func` (Function): The function to partially apply arguments to.
- `partials` (...*, optional): The arguments to be partially applied.

Returns `Function`.

```javascript
function greet(greeting, name) {
  return greeting + ' ' + name;
};
var sayHelloTo = _.partial(greet, 'hello');
sayHelloTo('fred')
```

Result (string):

```json
"hello fred"
```

```javascript
function greet(greeting, name) {
  return greeting + ' ' + name;
};
var sayHelloTo = _.partial(greet, 'hello');
var greetFred = _.partial(greet, _, 'fred');
greetFred('hi')
```

Result (string):

```json
"hi fred"
```

### `_.partialRight(func, [partials])`

This method is like `_.partial` except that partially applied arguments
are appended to the arguments it receives.

The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments.

**Note:** This method doesn't set the "length" property of partially
applied functions.

- `func` (Function): The function to partially apply arguments to.
- `partials` (...*, optional): The arguments to be partially applied.

Returns `Function`.

```javascript
function greet(greeting, name) {
  return greeting + ' ' + name;
};
var greetFred = _.partialRight(greet, 'fred');
greetFred('hi')
```

Result (string):

```json
"hi fred"
```

```javascript
function greet(greeting, name) {
  return greeting + ' ' + name;
};
var greetFred = _.partialRight(greet, 'fred');
var sayHelloTo = _.partialRight(greet, 'hello', _);
sayHelloTo('fred')
```

Result (string):

```json
"hello fred"
```

### `_.rearg(func, indexes)`

Creates a function that invokes `func` with arguments arranged according
to the specified `indexes` where the argument value at the first index is
provided as the first argument, the argument value at the second index is
provided as the second argument, and so on.

- `func` (Function): The function to rearrange arguments for.
- `indexes` (...(number|number[])): The arranged argument indexes.

Returns `Function`.

```javascript
var rearged = _.rearg(function(a, b, c) {
  return [a, b, c];
}, [2, 0, 1]);
rearged('b', 'c', 'a')
```

Result (list):

```json
[
  "a",
  "b",
  "c"
]
```

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

Creates a function that invokes `func` with the `this` binding of the
created function and arguments from `start` and beyond provided as
an array.

**Note:** This method is based on the
[rest parameter](https://mdn.io/rest_parameters).

- `func` (Function): The function to apply a rest parameter to.
- `start` (number, optional, default func.length-1): The start position of the rest parameter.

Returns `Function`.

```javascript
var say = _.rest(function(what, names) {
  return what + ' ' + _.initial(names).join(', ') +
    (_.size(names) > 1 ? ', & ' : '') + _.last(names);
});
say('hello', 'fred', 'barney', 'pebbles')
```

Result (string):

```json
"hello fred, barney, & pebbles"
```

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

Creates a function that invokes `func` with the `this` binding of the
create function and an array of arguments much like
[`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).

**Note:** This method is based on the
[spread operator](https://mdn.io/spread_operator).

- `func` (Function): The function to spread arguments over.
- `start` (number, optional, default 0): The start position of the spread.

Returns `Function`.

```javascript
var say = _.spread(function(who, what) {
  return who + ' says ' + what;
});
say(['fred', 'hello'])
```

Result (string):

```json
"fred says hello"
```

```javascript
var say = _.spread(function(who, what) {
  return who + ' says ' + what;
});
var numbers = Promise.all([
  Promise.resolve(40),
  Promise.resolve(36)
]);
numbers.then(_.spread(function(x, y) {
  return x + y;
}))
```

Result (object):

```json
{}
```

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

Creates a throttled function that only invokes `func` at most once per
every `wait` milliseconds. The throttled function comes with a `cancel`
method to cancel delayed `func` invocations and a `flush` method to
immediately invoke them. Provide `options` to indicate whether `func`
should be invoked on the leading and/or trailing edge of the `wait`
timeout. The `func` is invoked with the last arguments provided to the
throttled function. Subsequent calls to the throttled function return the
result of the last `func` invocation.

**Note:** If `leading` and `trailing` options are `true`, `func` is
invoked on the trailing edge of the timeout only if the throttled function
is invoked more than once during the `wait` timeout.

If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
until to the next tick, similar to `setTimeout` with a timeout of `0`.

See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
for details over the differences between `_.throttle` and `_.debounce`.

- `func` (Function): The function to throttle.
- `wait` (number, optional, default 0): The number of milliseconds to throttle invocations to.
- `options` (Object, optional, default {}): The options object.
- `options.leading` (boolean, optional, default true): Specify invoking on the leading edge of the timeout.
- `options.trailing` (boolean, optional, default true): Specify invoking on the trailing edge of the timeout.

Returns `Function`.

### `_.unary(func)`

Creates a function that accepts up to one argument, ignoring any
additional arguments.

- `func` (Function): The function to cap arguments for.

Returns `Function`.

```javascript
_.map(['6', '8', '10'], _.unary(parseInt))
```

Result (list):

```json
[
  6,
  8,
  10
]
```

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

Creates a function that provides `value` to `wrapper` as its first
argument. Any additional arguments provided to the function are appended
to those provided to the `wrapper`. The wrapper is invoked with the `this`
binding of the created function.

- `value` (*): The value to wrap.
- `wrapper` (Function, optional, default identity): The wrapper function.

Returns `Function`.

```javascript
var p = _.wrap(_.escape, function(func, text) {
  return '<p>' + func(text) + '</p>';
});
p('fred, barney, & pebbles')
```

Result (string):

```json
"<p>fred, barney, &amp; pebbles</p>"
```

## Lang

### `_.castArray(value)`

Casts `value` as an array if it's not one.

- `value` (*): The value to inspect.

Returns `Array`.

```javascript
_.castArray(1)
```

Result (list):

```json
[
  1
]
```

```javascript
_.castArray({ 'a': 1 })
```

Result (list):

```json
[
  {
    "a": 1
  }
]
```

```javascript
_.castArray('abc')
```

Result (list):

```json
[
  "abc"
]
```

```javascript
_.castArray(null)
```

Result (list):

```json
[
  null
]
```

### `_.clone(value)`

Creates a shallow clone of `value`.

**Note:** This method is loosely based on the
[structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
and supports cloning arrays, array buffers, booleans, date objects, maps,
numbers, `Object` objects, regexes, sets, strings, symbols, and typed
arrays. The own enumerable properties of `arguments` objects are cloned
as plain objects. An empty object is returned for uncloneable values such
as error objects, functions, DOM nodes, and WeakMaps.

- `value` (*): The value to clone.

Returns `*`.

```javascript
var objects = [{ 'a': 1 }, { 'b': 2 }];
var shallow = _.clone(objects);
console.log(shallow[0] === objects[0])
```

Result (undefined):

```json
undefined
```

### `_.cloneDeep(value)`

This method is like `_.clone` except that it recursively clones `value`.

- `value` (*): The value to recursively clone.

Returns `*`.

```javascript
var objects = [{ 'a': 1 }, { 'b': 2 }];
var deep = _.cloneDeep(objects);
console.log(deep[0] === objects[0])
```

Result (undefined):

```json
undefined
```

### `_.cloneDeepWith(value, [customizer])`

This method is like `_.cloneWith` except that it recursively clones `value`.

- `value` (*): The value to recursively clone.
- `customizer` (Function, optional): The function to customize cloning.

Returns `*`.

### `_.cloneWith(value, [customizer])`

This method is like `_.clone` except that it accepts `customizer` which
is invoked to produce the cloned value. If `customizer` returns `undefined`,
cloning is handled by the method instead. The `customizer` is invoked with
up to four arguments; (value [, index|key, object, stack]).

- `value` (*): The value to clone.
- `customizer` (Function, optional): The function to customize cloning.

Returns `*`.

### `_.conformsTo(object, source)`

Checks if `object` conforms to `source` by invoking the predicate
properties of `source` with the corresponding property values of `object`.

**Note:** This method is equivalent to `_.conforms` when `source` is
partially applied.

- `object` (Object): The object to inspect.
- `source` (Object): The object of property predicates to conform to.

Returns `boolean`.

```javascript
var object = { 'a': 1, 'b': 2 };
_.conformsTo(object, { 'b': function(n) { return n > 1; } })
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': 1, 'b': 2 };
_.conformsTo(object, { 'b': function(n) { return n > 2; } })
```

Result (boolean):

```json
false
```

### `_.eq(value, other)`

Performs a
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
comparison between two values to determine if they are equivalent.

- `value` (*): The value to compare.
- `other` (*): The other value to compare.

Returns `boolean`.

```javascript
var object = { 'a': 1 };
var other = { 'a': 1 };
_.eq(object, object)
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': 1 };
var other = { 'a': 1 };
_.eq(object, other)
```

Result (boolean):

```json
false
```

```javascript
var object = { 'a': 1 };
var other = { 'a': 1 };
_.eq('a', 'a')
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': 1 };
var other = { 'a': 1 };
_.eq('a', Object('a'))
```

Result (boolean):

```json
false
```

### `_.gt(value, other)`

Checks if `value` is greater than `other`.

- `value` (*): The value to compare.
- `other` (*): The other value to compare.

Returns `boolean`.

```javascript
_.gt(3, 1)
```

Result (boolean):

```json
true
```

```javascript
_.gt(3, 3)
```

Result (boolean):

```json
false
```

```javascript
_.gt(1, 3)
```

Result (boolean):

```json
false
```

### `_.gte(value, other)`

Checks if `value` is greater than or equal to `other`.

- `value` (*): The value to compare.
- `other` (*): The other value to compare.

Returns `boolean`.

```javascript
_.gte(3, 1)
```

Result (boolean):

```json
true
```

```javascript
_.gte(3, 3)
```

Result (boolean):

```json
true
```

```javascript
_.gte(1, 3)
```

Result (boolean):

```json
false
```

### `_.isArguments(value)`

Checks if `value` is likely an `arguments` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isArguments(function() { return arguments; }())
```

Result (boolean):

```json
true
```

```javascript
_.isArguments([1, 2, 3])
```

Result (boolean):

```json
false
```

### `_.isArray(value)`

Checks if `value` is classified as an `Array` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isArray([1, 2, 3])
```

Result (boolean):

```json
true
```

```javascript
_.isArray('abc')
```

Result (boolean):

```json
false
```

```javascript
_.isArray(_.noop)
```

Result (boolean):

```json
false
```

### `_.isArrayBuffer(value)`

Checks if `value` is classified as an `ArrayBuffer` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isArrayBuffer(new ArrayBuffer(2))
```

Result (boolean):

```json
true
```

```javascript
_.isArrayBuffer(new Array(2))
```

Result (boolean):

```json
false
```

### `_.isArrayLike(value)`

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
equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isArrayLike([1, 2, 3])
```

Result (boolean):

```json
true
```

```javascript
_.isArrayLike('abc')
```

Result (boolean):

```json
true
```

```javascript
_.isArrayLike(_.noop)
```

Result (boolean):

```json
false
```

### `_.isArrayLikeObject(value)`

This method is like `_.isArrayLike` except that it also checks if `value`
is an object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isArrayLikeObject([1, 2, 3])
```

Result (boolean):

```json
true
```

```javascript
_.isArrayLikeObject('abc')
```

Result (boolean):

```json
false
```

```javascript
_.isArrayLikeObject(_.noop)
```

Result (boolean):

```json
false
```

### `_.isBoolean(value)`

Checks if `value` is classified as a boolean primitive or object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isBoolean(false)
```

Result (boolean):

```json
true
```

```javascript
_.isBoolean(null)
```

Result (boolean):

```json
false
```

### `_.isBuffer(value)`

Checks if `value` is a buffer.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isBuffer(new Uint8Array(2))
```

Result (boolean):

```json
false
```

### `_.isDate(value)`

Checks if `value` is classified as a `Date` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isDate(new Date)
```

Result (boolean):

```json
true
```

```javascript
_.isDate('Mon April 23 2012')
```

Result (boolean):

```json
false
```

### `_.isElement(value)`

Checks if `value` is likely a DOM element.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isElement('<body>')
```

Result (boolean):

```json
false
```

### `_.isEmpty(value)`

Checks if `value` is an empty object, collection, map, or set.

Objects are considered empty if they have no own enumerable string keyed
properties.

Array-like values such as `arguments` objects, arrays, buffers, strings, or
jQuery-like collections are considered empty if they have a `length` of `0`.
Similarly, maps and sets are considered empty if they have a `size` of `0`.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isEmpty(null)
```

Result (boolean):

```json
true
```

```javascript
_.isEmpty(true)
```

Result (boolean):

```json
true
```

```javascript
_.isEmpty(1)
```

Result (boolean):

```json
true
```

```javascript
_.isEmpty([1, 2, 3])
```

Result (boolean):

```json
false
```

### `_.isEqual(value, other)`

Performs a deep comparison between two values to determine if they are
equivalent.

**Note:** This method supports comparing arrays, array buffers, booleans,
date objects, error objects, maps, numbers, `Object` objects, regexes,
sets, strings, symbols, and typed arrays. `Object` objects are compared
by their own, not inherited, enumerable properties. Functions and DOM
nodes are compared by strict equality, i.e. `===`.

- `value` (*): The value to compare.
- `other` (*): The other value to compare.

Returns `boolean`.

```javascript
var object = { 'a': 1 };
var other = { 'a': 1 };
_.isEqual(object, other)
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': 1 };
var other = { 'a': 1 };
object === other
```

Result (boolean):

```json
false
```

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

This method is like `_.isEqual` except that it accepts `customizer` which
is invoked to compare values. If `customizer` returns `undefined`, comparisons
are handled by the method instead. The `customizer` is invoked with up to
six arguments: (objValue, othValue [, index|key, object, other, stack]).

- `value` (*): The value to compare.
- `other` (*): The other value to compare.
- `customizer` (Function, optional): The function to customize comparisons.

Returns `boolean`.

```javascript
function isGreeting(value) {
  return /^h(?:i|ello)$/.test(value);
};
function customizer(objValue, othValue) {
  if (isGreeting(objValue) && isGreeting(othValue)) {
    return true;
  }
};
var array = ['hello', 'goodbye'];
var other = ['hi', 'goodbye'];
_.isEqualWith(array, other, customizer)
```

Result (boolean):

```json
true
```

### `_.isError(value)`

Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
`SyntaxError`, `TypeError`, or `URIError` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isError(new Error)
```

Result (boolean):

```json
true
```

```javascript
_.isError(Error)
```

Result (boolean):

```json
false
```

### `_.isFinite(value)`

Checks if `value` is a finite primitive number.

**Note:** This method is based on
[`Number.isFinite`](https://mdn.io/Number/isFinite).

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isFinite(3)
```

Result (boolean):

```json
true
```

```javascript
_.isFinite(Number.MIN_VALUE)
```

Result (boolean):

```json
true
```

```javascript
_.isFinite(Infinity)
```

Result (boolean):

```json
false
```

```javascript
_.isFinite('3')
```

Result (boolean):

```json
false
```

### `_.isFunction(value)`

Checks if `value` is classified as a `Function` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isFunction(_)
```

Result (boolean):

```json
true
```

```javascript
_.isFunction(/abc/)
```

Result (boolean):

```json
false
```

### `_.isInteger(value)`

Checks if `value` is an integer.

**Note:** This method is based on
[`Number.isInteger`](https://mdn.io/Number/isInteger).

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isInteger(3)
```

Result (boolean):

```json
true
```

```javascript
_.isInteger(Number.MIN_VALUE)
```

Result (boolean):

```json
false
```

```javascript
_.isInteger(Infinity)
```

Result (boolean):

```json
false
```

```javascript
_.isInteger('3')
```

Result (boolean):

```json
false
```

### `_.isLength(value)`

Checks if `value` is a valid array-like length.

**Note:** This method is loosely based on
[`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isLength(3)
```

Result (boolean):

```json
true
```

```javascript
_.isLength(Number.MIN_VALUE)
```

Result (boolean):

```json
false
```

```javascript
_.isLength(Infinity)
```

Result (boolean):

```json
false
```

```javascript
_.isLength('3')
```

Result (boolean):

```json
false
```

### `_.isMap(value)`

Checks if `value` is classified as a `Map` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isMap(new Map)
```

Result (boolean):

```json
true
```

```javascript
_.isMap(new WeakMap)
```

Result (boolean):

```json
false
```

### `_.isMatch(object, source)`

Performs a partial deep comparison between `object` and `source` to
determine if `object` contains equivalent property values.

**Note:** This method is equivalent to `_.matches` when `source` is
partially applied.

Partial comparisons will match empty array and empty object `source`
values against any array or object value, respectively. See `_.isEqual`
for a list of supported value comparisons.

- `object` (Object): The object to inspect.
- `source` (Object): The object of property values to match.

Returns `boolean`.

```javascript
var object = { 'a': 1, 'b': 2 };
_.isMatch(object, { 'b': 2 })
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': 1, 'b': 2 };
_.isMatch(object, { 'b': 1 })
```

Result (boolean):

```json
false
```

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

This method is like `_.isMatch` except that it accepts `customizer` which
is invoked to compare values. If `customizer` returns `undefined`, comparisons
are handled by the method instead. The `customizer` is invoked with five
arguments: (objValue, srcValue, index|key, object, source).

- `object` (Object): The object to inspect.
- `source` (Object): The object of property values to match.
- `customizer` (Function, optional): The function to customize comparisons.

Returns `boolean`.

```javascript
function isGreeting(value) {
  return /^h(?:i|ello)$/.test(value);
};
function customizer(objValue, srcValue) {
  if (isGreeting(objValue) && isGreeting(srcValue)) {
    return true;
  }
};
var object = { 'greeting': 'hello' };
var source = { 'greeting': 'hi' };
_.isMatchWith(object, source, customizer)
```

Result (boolean):

```json
true
```

### `_.isNaN(value)`

Checks if `value` is `NaN`.

**Note:** This method is based on
[`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
`undefined` and other non-number values.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isNaN(NaN)
```

Result (boolean):

```json
true
```

```javascript
_.isNaN(new Number(NaN))
```

Result (boolean):

```json
true
```

```javascript
isNaN(undefined)
```

Result (boolean):

```json
true
```

```javascript
_.isNaN(undefined)
```

Result (boolean):

```json
false
```

### `_.isNative(value)`

Checks if `value` is a pristine native function.

**Note:** This method can't reliably detect native functions in the presence
of the core-js package because core-js circumvents this kind of detection.
Despite multiple requests, the core-js maintainer has made it clear: any
attempt to fix the detection will be obstructed. As a result, we're left
with little choice but to throw an error. Unfortunately, this also affects
packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
which rely on core-js.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isNative(Array.prototype.push)
```

Result (boolean):

```json
true
```

```javascript
_.isNative(_)
```

Result (boolean):

```json
false
```

### `_.isNil(value)`

Checks if `value` is `null` or `undefined`.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isNil(null)
```

Result (boolean):

```json
true
```

```javascript
_.isNil(void 0)
```

Result (boolean):

```json
true
```

```javascript
_.isNil(NaN)
```

Result (boolean):

```json
false
```

### `_.isNull(value)`

Checks if `value` is `null`.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isNull(null)
```

Result (boolean):

```json
true
```

```javascript
_.isNull(void 0)
```

Result (boolean):

```json
false
```

### `_.isNumber(value)`

Checks if `value` is classified as a `Number` primitive or object.

**Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
classified as numbers, use the `_.isFinite` method.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isNumber(3)
```

Result (boolean):

```json
true
```

```javascript
_.isNumber(Number.MIN_VALUE)
```

Result (boolean):

```json
true
```

```javascript
_.isNumber(Infinity)
```

Result (boolean):

```json
true
```

```javascript
_.isNumber('3')
```

Result (boolean):

```json
false
```

### `_.isObject(value)`

Checks if `value` is the
[language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isObject({})
```

Result (boolean):

```json
true
```

```javascript
_.isObject([1, 2, 3])
```

Result (boolean):

```json
true
```

```javascript
_.isObject(_.noop)
```

Result (boolean):

```json
true
```

```javascript
_.isObject(null)
```

Result (boolean):

```json
false
```

### `_.isObjectLike(value)`

Checks if `value` is object-like. A value is object-like if it's not `null`
and has a `typeof` result of "object".

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isObjectLike({})
```

Result (boolean):

```json
true
```

```javascript
_.isObjectLike([1, 2, 3])
```

Result (boolean):

```json
true
```

```javascript
_.isObjectLike(_.noop)
```

Result (boolean):

```json
false
```

```javascript
_.isObjectLike(null)
```

Result (boolean):

```json
false
```

### `_.isPlainObject(value)`

Checks if `value` is a plain object, that is, an object created by the
`Object` constructor or one with a `[[Prototype]]` of `null`.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
function Foo() {
  this.a = 1;
};
_.isPlainObject(new Foo)
```

Result (boolean):

```json
false
```

```javascript
function Foo() {
  this.a = 1;
};
_.isPlainObject([1, 2, 3])
```

Result (boolean):

```json
false
```

```javascript
function Foo() {
  this.a = 1;
};
_.isPlainObject({ 'x': 0, 'y': 0 })
```

Result (boolean):

```json
true
```

```javascript
function Foo() {
  this.a = 1;
};
_.isPlainObject(Object.create(null))
```

Result (boolean):

```json
true
```

### `_.isRegExp(value)`

Checks if `value` is classified as a `RegExp` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isRegExp(/abc/)
```

Result (boolean):

```json
true
```

```javascript
_.isRegExp('/abc/')
```

Result (boolean):

```json
false
```

### `_.isSafeInteger(value)`

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.

**Note:** This method is based on
[`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isSafeInteger(3)
```

Result (boolean):

```json
true
```

```javascript
_.isSafeInteger(Number.MIN_VALUE)
```

Result (boolean):

```json
false
```

```javascript
_.isSafeInteger(Infinity)
```

Result (boolean):

```json
false
```

```javascript
_.isSafeInteger('3')
```

Result (boolean):

```json
false
```

### `_.isSet(value)`

Checks if `value` is classified as a `Set` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isSet(new Set)
```

Result (boolean):

```json
true
```

```javascript
_.isSet(new WeakSet)
```

Result (boolean):

```json
false
```

### `_.isString(value)`

Checks if `value` is classified as a `String` primitive or object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isString('abc')
```

Result (boolean):

```json
true
```

```javascript
_.isString(1)
```

Result (boolean):

```json
false
```

### `_.isSymbol(value)`

Checks if `value` is classified as a `Symbol` primitive or object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isSymbol(Symbol.iterator)
```

Result (boolean):

```json
true
```

```javascript
_.isSymbol('abc')
```

Result (boolean):

```json
false
```

### `_.isTypedArray(value)`

Checks if `value` is classified as a typed array.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isTypedArray(new Uint8Array)
```

Result (boolean):

```json
true
```

```javascript
_.isTypedArray([])
```

Result (boolean):

```json
false
```

### `_.isUndefined(value)`

Checks if `value` is `undefined`.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isUndefined(void 0)
```

Result (boolean):

```json
true
```

```javascript
_.isUndefined(null)
```

Result (boolean):

```json
false
```

### `_.isWeakMap(value)`

Checks if `value` is classified as a `WeakMap` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isWeakMap(new WeakMap)
```

Result (boolean):

```json
true
```

```javascript
_.isWeakMap(new Map)
```

Result (boolean):

```json
false
```

### `_.isWeakSet(value)`

Checks if `value` is classified as a `WeakSet` object.

- `value` (*): The value to check.

Returns `boolean`.

```javascript
_.isWeakSet(new WeakSet)
```

Result (boolean):

```json
true
```

```javascript
_.isWeakSet(new Set)
```

Result (boolean):

```json
false
```

### `_.lt(value, other)`

Checks if `value` is less than `other`.

- `value` (*): The value to compare.
- `other` (*): The other value to compare.

Returns `boolean`.

```javascript
_.lt(1, 3)
```

Result (boolean):

```json
true
```

```javascript
_.lt(3, 3)
```

Result (boolean):

```json
false
```

```javascript
_.lt(3, 1)
```

Result (boolean):

```json
false
```

### `_.lte(value, other)`

Checks if `value` is less than or equal to `other`.

- `value` (*): The value to compare.
- `other` (*): The other value to compare.

Returns `boolean`.

```javascript
_.lte(1, 3)
```

Result (boolean):

```json
true
```

```javascript
_.lte(3, 3)
```

Result (boolean):

```json
true
```

```javascript
_.lte(3, 1)
```

Result (boolean):

```json
false
```

### `_.toArray(value)`

Converts `value` to an array.

- `value` (*): The value to convert.

Returns `Array`.

```javascript
_.toArray({ 'a': 1, 'b': 2 })
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
_.toArray('abc')
```

Result (list):

```json
[
  "a",
  "b",
  "c"
]
```

```javascript
_.toArray(1)
```

Result (list):

```json
[]
```

```javascript
_.toArray(null)
```

Result (list):

```json
[]
```

### `_.toFinite(value)`

Converts `value` to a finite number.

- `value` (*): The value to convert.

Returns `number`.

```javascript
_.toFinite(3.2)
```

Result (number):

```json
3.2
```

```javascript
_.toFinite(Number.MIN_VALUE)
```

Result (number):

```json
5e-324
```

```javascript
_.toFinite(Infinity)
```

Result (number):

```json
1.7976931348623157e+308
```

```javascript
_.toFinite('3.2')
```

Result (number):

```json
3.2
```

### `_.toInteger(value)`

Converts `value` to an integer.

**Note:** This method is loosely based on
[`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).

- `value` (*): The value to convert.

Returns `number`.

```javascript
_.toInteger(3.2)
```

Result (number):

```json
3
```

```javascript
_.toInteger(Number.MIN_VALUE)
```

Result (number):

```json
0
```

```javascript
_.toInteger(Infinity)
```

Result (number):

```json
1.7976931348623157e+308
```

```javascript
_.toInteger('3.2')
```

Result (number):

```json
3
```

### `_.toLength(value)`

Converts `value` to an integer suitable for use as the length of an
array-like object.

**Note:** This method is based on
[`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).

- `value` (*): The value to convert.

Returns `number`.

```javascript
_.toLength(3.2)
```

Result (number):

```json
3
```

```javascript
_.toLength(Number.MIN_VALUE)
```

Result (number):

```json
0
```

```javascript
_.toLength(Infinity)
```

Result (number):

```json
4294967295
```

```javascript
_.toLength('3.2')
```

Result (number):

```json
3
```

### `_.toNumber(value)`

Converts `value` to a number.

- `value` (*): The value to process.

Returns `number`.

```javascript
_.toNumber(3.2)
```

Result (number):

```json
3.2
```

```javascript
_.toNumber(Number.MIN_VALUE)
```

Result (number):

```json
5e-324
```

```javascript
_.toNumber(Infinity)
```

Result (number):

```json
null
```

```javascript
_.toNumber('3.2')
```

Result (number):

```json
3.2
```

### `_.toPlainObject(value)`

Converts `value` to a plain object flattening inherited enumerable string
keyed properties of `value` to own properties of the plain object.

- `value` (*): The value to convert.

Returns `Object`.

```javascript
function Foo() {
  this.b = 2;
};
_.assign({ 'a': 1 }, new Foo)
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

```javascript
function Foo() {
  this.b = 2;
};
_.assign({ 'a': 1 }, _.toPlainObject(new Foo))
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

### `_.toSafeInteger(value)`

Converts `value` to a safe integer. A safe integer can be compared and
represented correctly.

- `value` (*): The value to convert.

Returns `number`.

```javascript
_.toSafeInteger(3.2)
```

Result (number):

```json
3
```

```javascript
_.toSafeInteger(Number.MIN_VALUE)
```

Result (number):

```json
0
```

```javascript
_.toSafeInteger(Infinity)
```

Result (number):

```json
9007199254740991
```

```javascript
_.toSafeInteger('3.2')
```

Result (number):

```json
3
```

### `_.toString(value)`

Converts `value` to a string. An empty string is returned for `null`
and `undefined` values. The sign of `-0` is preserved.

- `value` (*): The value to convert.

Returns `string`.

```javascript
_.toString(null)
```

Result (string):

```json
""
```

```javascript
_.toString(-0)
```

Result (string):

```json
"-0"
```

```javascript
_.toString([1, 2, 3])
```

Result (string):

```json
"1,2,3"
```

## Math

### `_.add(augend, addend)`

Adds two numbers.

- `augend` (number): The first number in an addition.
- `addend` (number): The second number in an addition.

Returns `number`.

```javascript
_.add(6, 4)
```

Result (number):

```json
10
```

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

Computes `number` rounded up to `precision`.

- `number` (number): The number to round up.
- `precision` (number, optional, default 0): The precision to round up to.

Returns `number`.

```javascript
_.ceil(4.006)
```

Result (number):

```json
5
```

```javascript
_.ceil(6.004, 2)
```

Result (number):

```json
6.01
```

```javascript
_.ceil(6040, -2)
```

Result (number):

```json
6100
```

### `_.divide(dividend, divisor)`

Divide two numbers.

- `dividend` (number): The first number in a division.
- `divisor` (number): The second number in a division.

Returns `number`.

```javascript
_.divide(6, 4)
```

Result (number):

```json
1.5
```

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

Computes `number` rounded down to `precision`.

- `number` (number): The number to round down.
- `precision` (number, optional, default 0): The precision to round down to.

Returns `number`.

```javascript
_.floor(4.006)
```

Result (number):

```json
4
```

```javascript
_.floor(0.046, 2)
```

Result (number):

```json
0.04
```

```javascript
_.floor(4060, -2)
```

Result (number):

```json
4000
```

### `_.max(array)`

Computes the maximum value of `array`. If `array` is empty or falsey,
`undefined` is returned.

- `array` (Array): The array to iterate over.

Returns `*`.

```javascript
_.max([4, 2, 8, 6])
```

Result (number):

```json
8
```

```javascript
_.max([])
```

Result (undefined):

```json
undefined
```

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

This method is like `_.max` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the criterion by which
the value is ranked. The iteratee is invoked with one argument: (value).

- `array` (Array): The array to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `*`.

```javascript
var objects = [{ 'n': 1 }, { 'n': 2 }];
_.maxBy(objects, function(o) { return o.n; })
```

Result (object):

```json
{
  "n": 2
}
```

```javascript
var objects = [{ 'n': 1 }, { 'n': 2 }];
_.maxBy(objects, 'n')
```

Result (object):

```json
{
  "n": 2
}
```

### `_.mean(array)`

Computes the mean of the values in `array`.

- `array` (Array): The array to iterate over.

Returns `number`.

```javascript
_.mean([4, 2, 8, 6])
```

Result (number):

```json
5
```

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

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.
The iteratee is invoked with one argument: (value).

- `array` (Array): The array to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `number`.

```javascript
var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
_.meanBy(objects, function(o) { return o.n; })
```

Result (number):

```json
5
```

```javascript
var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
_.meanBy(objects, 'n')
```

Result (number):

```json
5
```

### `_.min(array)`

Computes the minimum value of `array`. If `array` is empty or falsey,
`undefined` is returned.

- `array` (Array): The array to iterate over.

Returns `*`.

```javascript
_.min([4, 2, 8, 6])
```

Result (number):

```json
2
```

```javascript
_.min([])
```

Result (undefined):

```json
undefined
```

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

This method is like `_.min` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the criterion by which
the value is ranked. The iteratee is invoked with one argument: (value).

- `array` (Array): The array to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `*`.

```javascript
var objects = [{ 'n': 1 }, { 'n': 2 }];
_.minBy(objects, function(o) { return o.n; })
```

Result (object):

```json
{
  "n": 1
}
```

```javascript
var objects = [{ 'n': 1 }, { 'n': 2 }];
_.minBy(objects, 'n')
```

Result (object):

```json
{
  "n": 1
}
```

### `_.multiply(multiplier, multiplicand)`

Multiply two numbers.

- `multiplier` (number): The first number in a multiplication.
- `multiplicand` (number): The second number in a multiplication.

Returns `number`.

```javascript
_.multiply(6, 4)
```

Result (number):

```json
24
```

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

Computes `number` rounded to `precision`.

- `number` (number): The number to round.
- `precision` (number, optional, default 0): The precision to round to.

Returns `number`.

```javascript
_.round(4.006)
```

Result (number):

```json
4
```

```javascript
_.round(4.006, 2)
```

Result (number):

```json
4.01
```

```javascript
_.round(4060, -2)
```

Result (number):

```json
4100
```

### `_.subtract(minuend, subtrahend)`

Subtract two numbers.

- `minuend` (number): The first number in a subtraction.
- `subtrahend` (number): The second number in a subtraction.

Returns `number`.

```javascript
_.subtract(6, 4)
```

Result (number):

```json
2
```

### `_.sum(array)`

Computes the sum of the values in `array`.

- `array` (Array): The array to iterate over.

Returns `number`.

```javascript
_.sum([4, 2, 8, 6])
```

Result (number):

```json
20
```

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

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.
The iteratee is invoked with one argument: (value).

- `array` (Array): The array to iterate over.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `number`.

```javascript
var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
_.sumBy(objects, function(o) { return o.n; })
```

Result (number):

```json
20
```

```javascript
var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
_.sumBy(objects, 'n')
```

Result (number):

```json
20
```

## Number

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

Clamps `number` within the inclusive `lower` and `upper` bounds.

- `number` (number): The number to clamp.
- `lower` (number, optional): The lower bound.
- `upper` (number): The upper bound.

Returns `number`.

```javascript
_.clamp(-10, -5, 5)
```

Result (number):

```json
-5
```

```javascript
_.clamp(10, -5, 5)
```

Result (number):

```json
5
```

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

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`.
If `start` is greater than `end` the params are swapped to support
negative ranges.

- `number` (number): The number to check.
- `start` (number, optional, default 0): The start of the range.
- `end` (number): The end of the range.

Returns `boolean`.

```javascript
_.inRange(3, 2, 4)
```

Result (boolean):

```json
true
```

```javascript
_.inRange(4, 8)
```

Result (boolean):

```json
true
```

```javascript
_.inRange(4, 2)
```

Result (boolean):

```json
false
```

```javascript
_.inRange(2, 2)
```

Result (boolean):

```json
false
```

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

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
is returned. If `floating` is `true`, or either `lower` or `upper` are
floats, a floating-point number is returned instead of an integer.

**Note:** JavaScript follows the IEEE-754 standard for resolving
floating-point values which can produce unexpected results.

**Note:** If `lower` is greater than `upper`, the values are swapped.

- `lower` (number, optional, default 0): The lower bound.
- `upper` (number, optional, default 1): The upper bound.
- `floating` (boolean, optional): Specify returning a floating-point number.

Returns `number`.

```javascript
_.random(0, 5)
```

Result (number):

```json
1
```

```javascript
_.random(5, 0)
```

Result (number):

```json
1
```

```javascript
_.random(5)
```

Result (number):

```json
1
```

```javascript
_.random(-5)
```

Result (number):

```json
-3
```

## Object

### `_.assign(object, [sources])`

Assigns own enumerable string keyed properties of source objects to the
destination object. Source objects are applied from left to right.
Subsequent sources overwrite property assignments of previous sources.

**Note:** This method mutates `object` and is loosely based on
[`Object.assign`](https://mdn.io/Object/assign).

- `object` (Object): The destination object.
- `sources` (...Object, optional): The source objects.

Returns `Object`.

```javascript
function Foo() {
  this.a = 1;
};
function Bar() {
  this.c = 3;
};
_.assign({ 'a': 0 }, new Foo, new Bar)
```

Result (object):

```json
{
  "a": 1,
  "c": 3
}
```

### `_.assignIn(object, [sources])`

This method is like `_.assign` except that it iterates over own and
inherited source properties.

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object, optional): The source objects.

Returns `Object`.

```javascript
function Foo() {
  this.a = 1;
};
function Bar() {
  this.c = 3;
};
_.assignIn({ 'a': 0 }, new Foo, new Bar)
```

Result (object):

```json
{
  "a": 1,
  "c": 3
}
```

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

This method is like `_.assignIn` except that it accepts `customizer`
which is invoked to produce the assigned values. If `customizer` returns
`undefined`, assignment is handled by the method instead. The `customizer`
is invoked with five arguments: (objValue, srcValue, key, object, source).

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object): The source objects.
- `customizer` (Function, optional): The function to customize assigned values.

Returns `Object`.

```javascript
function customizer(objValue, srcValue) {
  return _.isUndefined(objValue) ? srcValue : objValue;
};
var defaults = _.partialRight(_.assignInWith, customizer);
defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 })
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

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

This method is like `_.assign` except that it accepts `customizer`
which is invoked to produce the assigned values. If `customizer` returns
`undefined`, assignment is handled by the method instead. The `customizer`
is invoked with five arguments: (objValue, srcValue, key, object, source).

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object): The source objects.
- `customizer` (Function, optional): The function to customize assigned values.

Returns `Object`.

```javascript
function customizer(objValue, srcValue) {
  return _.isUndefined(objValue) ? srcValue : objValue;
};
var defaults = _.partialRight(_.assignWith, customizer);
defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 })
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

### `_.at(object, [paths])`

Creates an array of values corresponding to `paths` of `object`.

- `object` (Object): The object to iterate over.
- `paths` (...(string|string[]), optional): The property paths to pick.

Returns `Array`.

```javascript
var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
_.at(object, ['a[0].b.c', 'a[1]'])
```

Result (list):

```json
[
  3,
  4
]
```

### `_.create(prototype, [properties])`

Creates an object that inherits from the `prototype` object. If a
`properties` object is given, its own enumerable string keyed properties
are assigned to the created object.

- `prototype` (Object): The object to inherit from.
- `properties` (Object, optional): The properties to assign to the object.

Returns `Object`.

```javascript
function Shape() {
  this.x = 0;
  this.y = 0;
};
function Circle() {
  Shape.call(this);
};
var circle = new Circle;
circle instanceof Circle
```

Result (boolean):

```json
true
```

```javascript
function Shape() {
  this.x = 0;
  this.y = 0;
};
function Circle() {
  Shape.call(this);
};
var circle = new Circle;
circle instanceof Shape
```

Result (boolean):

```json
false
```

### `_.defaults(object, [sources])`

Assigns own and inherited enumerable string keyed properties of source
objects to the destination object for all destination properties that
resolve to `undefined`. Source objects are applied from left to right.
Once a property is set, additional values of the same property are ignored.

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object, optional): The source objects.

Returns `Object`.

```javascript
_.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 })
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

### `_.defaultsDeep(object, [sources])`

This method is like `_.defaults` except that it recursively assigns
default properties.

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object, optional): The source objects.

Returns `Object`.

```javascript
_.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } })
```

Result (object):

```json
{
  "a": {
    "b": 2,
    "c": 3
  }
}
```

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

This method is like `_.find` except that it returns the key of the first
element `predicate` returns truthy for instead of the element itself.

- `object` (Object): The object to inspect.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `string|undefined`.

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findKey(users, function(o) { return o.age < 40; })
```

Result (string):

```json
"barney"
```

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findKey(users, { 'age': 1, 'active': true })
```

Result (string):

```json
"pebbles"
```

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findKey(users, ['active', false])
```

Result (string):

```json
"fred"
```

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findKey(users, 'active')
```

Result (string):

```json
"barney"
```

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

This method is like `_.findKey` except that it iterates over elements of
a collection in the opposite order.

- `object` (Object): The object to inspect.
- `predicate` (Function, optional, default _.identity): The function invoked per iteration.

Returns `string|undefined`.

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findLastKey(users, function(o) { return o.age < 40; })
```

Result (string):

```json
"pebbles"
```

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findLastKey(users, { 'age': 36, 'active': true })
```

Result (string):

```json
"barney"
```

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findLastKey(users, ['active', false])
```

Result (string):

```json
"fred"
```

```javascript
var users = {
  'barney':  { 'age': 36, 'active': true },
  'fred':    { 'age': 40, 'active': false },
  'pebbles': { 'age': 1,  'active': true }
};
_.findLastKey(users, 'active')
```

Result (string):

```json
"pebbles"
```

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

Iterates over own and inherited enumerable string keyed properties of an
object and invokes `iteratee` for each property. The iteratee is invoked
with three arguments: (value, key, object). Iteratee functions may exit
iteration early by explicitly returning `false`.

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Object`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.forIn(new Foo, function(value, key) {
  console.log(key);
})
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

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

This method is like `_.forIn` except that it iterates over properties of
`object` in the opposite order.

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Object`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.forInRight(new Foo, function(value, key) {
  console.log(key);
})
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

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

Iterates over own enumerable string keyed properties of an object and
invokes `iteratee` for each property. The iteratee is invoked with three
arguments: (value, key, object). Iteratee functions may exit iteration
early by explicitly returning `false`.

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Object`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.forOwn(new Foo, function(value, key) {
  console.log(key);
})
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

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

This method is like `_.forOwn` except that it iterates over properties of
`object` in the opposite order.

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Object`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.forOwnRight(new Foo, function(value, key) {
  console.log(key);
})
```

Result (object):

```json
{
  "a": 1,
  "b": 2
}
```

### `_.functions(object)`

Creates an array of function property names from own enumerable properties
of `object`.

- `object` (Object): The object to inspect.

Returns `Array`.

```javascript
function Foo() {
  this.a = _.constant('a');
  this.b = _.constant('b');
};
_.functions(new Foo)
```

Result (list):

```json
[
  "a",
  "b"
]
```

### `_.functionsIn(object)`

Creates an array of function property names from own and inherited
enumerable properties of `object`.

- `object` (Object): The object to inspect.

Returns `Array`.

```javascript
function Foo() {
  this.a = _.constant('a');
  this.b = _.constant('b');
};
_.functionsIn(new Foo)
```

Result (list):

```json
[
  "a",
  "b"
]
```

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

Gets the value at `path` of `object`. If the resolved value is
`undefined`, the `defaultValue` is returned in its place.

- `object` (Object): The object to query.
- `path` (Array|string): The path of the property to get.
- `defaultValue` (*, optional): The value returned for `undefined` resolved values.

Returns `*`.

```javascript
var object = { 'a': [{ 'b': { 'c': 3 } }] };
_.get(object, 'a[0].b.c')
```

Result (number):

```json
3
```

```javascript
var object = { 'a': [{ 'b': { 'c': 3 } }] };
_.get(object, ['a', '0', 'b', 'c'])
```

Result (number):

```json
3
```

```javascript
var object = { 'a': [{ 'b': { 'c': 3 } }] };
_.get(object, 'a.b.c', 'default')
```

Result (string):

```json
"default"
```

### `_.has(object, path)`

Checks if `path` is a direct property of `object`.

- `object` (Object): The object to query.
- `path` (Array|string): The path to check.

Returns `boolean`.

```javascript
var object = { 'a': { 'b': 2 } };
var other = _.create({ 'a': _.create({ 'b': 2 }) });
_.has(object, 'a')
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': { 'b': 2 } };
var other = _.create({ 'a': _.create({ 'b': 2 }) });
_.has(object, 'a.b')
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': { 'b': 2 } };
var other = _.create({ 'a': _.create({ 'b': 2 }) });
_.has(object, ['a', 'b'])
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': { 'b': 2 } };
var other = _.create({ 'a': _.create({ 'b': 2 }) });
_.has(other, 'a')
```

Result (boolean):

```json
false
```

### `_.hasIn(object, path)`

Checks if `path` is a direct or inherited property of `object`.

- `object` (Object): The object to query.
- `path` (Array|string): The path to check.

Returns `boolean`.

```javascript
var object = _.create({ 'a': _.create({ 'b': 2 }) });
_.hasIn(object, 'a')
```

Result (boolean):

```json
true
```

```javascript
var object = _.create({ 'a': _.create({ 'b': 2 }) });
_.hasIn(object, 'a.b')
```

Result (boolean):

```json
true
```

```javascript
var object = _.create({ 'a': _.create({ 'b': 2 }) });
_.hasIn(object, ['a', 'b'])
```

Result (boolean):

```json
true
```

```javascript
var object = _.create({ 'a': _.create({ 'b': 2 }) });
_.hasIn(object, 'b')
```

Result (boolean):

```json
false
```

### `_.invert(object)`

Creates an object composed of the inverted keys and values of `object`.
If `object` contains duplicate values, subsequent values overwrite
property assignments of previous values.

- `object` (Object): The object to invert.

Returns `Object`.

```javascript
var object = { 'a': 1, 'b': 2, 'c': 1 };
_.invert(object)
```

Result (object):

```json
{
  "1": "c",
  "2": "b"
}
```

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

This method is like `_.invert` except that the inverted object is generated
from the results of running each element of `object` thru `iteratee`. The
corresponding inverted value of each inverted key is an array of keys
responsible for generating the inverted value. The iteratee is invoked
with one argument: (value).

- `object` (Object): The object to invert.
- `iteratee` (Function, optional, default _.identity): The iteratee invoked per element.

Returns `Object`.

```javascript
var object = { 'a': 1, 'b': 2, 'c': 1 };
_.invertBy(object)
```

Result (object):

```json
{
  "1": [
    "a",
    "c"
  ],
  "2": [
    "b"
  ]
}
```

```javascript
var object = { 'a': 1, 'b': 2, 'c': 1 };
_.invertBy(object, function(value) {
  return 'group' + value;
})
```

Result (object):

```json
{
  "group1": [
    "a",
    "c"
  ],
  "group2": [
    "b"
  ]
}
```

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

Invokes the method at `path` of `object`.

- `object` (Object): The object to query.
- `path` (Array|string): The path of the method to invoke.
- `args` (...*, optional): The arguments to invoke the method with.

Returns `*`.

```javascript
var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
_.invoke(object, 'a[0].b.c.slice', 1, 3)
```

Result (list):

```json
[
  2,
  3
]
```

### `_.keys(object)`

Creates an array of the own enumerable property names of `object`.

**Note:** Non-object values are coerced to objects. See the
[ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
for more details.

- `object` (Object): The object to query.

Returns `Array`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.keys(new Foo)
```

Result (list):

```json
[
  "a",
  "b"
]
```

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.keys('hi')
```

Result (list):

```json
[
  "0",
  "1"
]
```

### `_.keysIn(object)`

Creates an array of the own and inherited enumerable property names of `object`.

**Note:** Non-object values are coerced to objects.

- `object` (Object): The object to query.

Returns `Array`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.keysIn(new Foo)
```

Result (list):

```json
[
  "a",
  "b"
]
```

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

The opposite of `_.mapValues`; this method creates an object with the
same values as `object` and keys generated by running each own enumerable
string keyed property of `object` thru `iteratee`. The iteratee is invoked
with three arguments: (value, key, object).

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Object`.

```javascript
_.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  return key + value;
})
```

Result (object):

```json
{
  "a1": 1,
  "b2": 2
}
```

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

Creates an object with the same keys as `object` and values generated
by running each own enumerable string keyed property of `object` thru
`iteratee`. The iteratee is invoked with three arguments:
(value, key, object).

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Object`.

```javascript
var users = {
  'fred':    { 'user': 'fred',    'age': 40 },
  'pebbles': { 'user': 'pebbles', 'age': 1 }
};
_.mapValues(users, function(o) { return o.age; })
```

Result (object):

```json
{
  "fred": 40,
  "pebbles": 1
}
```

```javascript
var users = {
  'fred':    { 'user': 'fred',    'age': 40 },
  'pebbles': { 'user': 'pebbles', 'age': 1 }
};
_.mapValues(users, 'age')
```

Result (object):

```json
{
  "fred": 40,
  "pebbles": 1
}
```

### `_.merge(object, [sources])`

This method is like `_.assign` except that it recursively merges own and
inherited enumerable string keyed properties of source objects into the
destination object. Source properties that resolve to `undefined` are
skipped if a destination value exists. Array and plain object properties
are merged recursively. Other objects and value types are overridden by
assignment. Source objects are applied from left to right. Subsequent
sources overwrite property assignments of previous sources.

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object, optional): The source objects.

Returns `Object`.

```javascript
var object = {
  'a': [{ 'b': 2 }, { 'd': 4 }]
};
var other = {
  'a': [{ 'c': 3 }, { 'e': 5 }]
};
_.merge(object, other)
```

Result (object):

```json
{
  "a": [
    {
      "b": 2,
      "c": 3
    },
    {
      "d": 4,
      "e": 5
    }
  ]
}
```

### `_.mergeWith(object, sources, customizer)`

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 six arguments:
(objValue, srcValue, key, object, source, stack).

**Note:** This method mutates `object`.

- `object` (Object): The destination object.
- `sources` (...Object): The source objects.
- `customizer` (Function): The function to customize assigned values.

Returns `Object`.

```javascript
function customizer(objValue, srcValue) {
  if (_.isArray(objValue)) {
    return objValue.concat(srcValue);
  }
};
var object = { 'a': [1], 'b': [2] };
var other = { 'a': [3], 'b': [4] };
_.mergeWith(object, other, customizer)
```

Result (object):

```json
{
  "a": [
    1,
    3
  ],
  "b": [
    2,
    4
  ]
}
```

### `_.omit(object, [paths])`

The opposite of `_.pick`; this method creates an object composed of the
own and inherited enumerable property paths of `object` that are not omitted.

**Note:** This method is considerably slower than `_.pick`.

- `object` (Object): The source object.
- `paths` (...(string|string[]), optional): The property paths to omit.

Returns `Object`.

```javascript
var object = { 'a': 1, 'b': '2', 'c': 3 };
_.omit(object, ['a', 'c'])
```

Result (object):

```json
{
  "b": "2"
}
```

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

The opposite of `_.pickBy`; this method creates an object composed of
the own and inherited enumerable string keyed properties of `object` that
`predicate` doesn't return truthy for. The predicate is invoked with two
arguments: (value, key).

- `object` (Object): The source object.
- `predicate` (Function, optional, default _.identity): The function invoked per property.

Returns `Object`.

```javascript
var object = { 'a': 1, 'b': '2', 'c': 3 };
_.omitBy(object, _.isNumber)
```

Result (object):

```json
{
  "b": "2"
}
```

### `_.pick(object, [paths])`

Creates an object composed of the picked `object` properties.

- `object` (Object): The source object.
- `paths` (...(string|string[]), optional): The property paths to pick.

Returns `Object`.

```javascript
var object = { 'a': 1, 'b': '2', 'c': 3 };
_.pick(object, ['a', 'c'])
```

Result (object):

```json
{
  "a": 1,
  "c": 3
}
```

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

Creates an object composed of the `object` properties `predicate` returns
truthy for. The predicate is invoked with two arguments: (value, key).

- `object` (Object): The source object.
- `predicate` (Function, optional, default _.identity): The function invoked per property.

Returns `Object`.

```javascript
var object = { 'a': 1, 'b': '2', 'c': 3 };
_.pickBy(object, _.isNumber)
```

Result (object):

```json
{
  "a": 1,
  "c": 3
}
```

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

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
its result is returned.

- `object` (Object): The object to query.
- `path` (Array|string): The path of the property to resolve.
- `defaultValue` (*, optional): The value returned for `undefined` resolved values.

Returns `*`.

```javascript
var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
_.result(object, 'a[0].b.c1')
```

Result (number):

```json
3
```

```javascript
var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
_.result(object, 'a[0].b.c2')
```

Result (number):

```json
4
```

```javascript
var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
_.result(object, 'a[0].b.c3', 'default')
```

Result (string):

```json
"default"
```

```javascript
var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
_.result(object, 'a[0].b.c3', _.constant('default'))
```

Result (string):

```json
"default"
```

### `_.set(object, path, value)`

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
are created for all other missing properties. Use `_.setWith` to customize
`path` creation.

**Note:** This method mutates `object`.

- `object` (Object): The object to modify.
- `path` (Array|string): The path of the property to set.
- `value` (*): The value to set.

Returns `Object`.

```javascript
var object = { 'a': [{ 'b': { 'c': 3 } }] };
console.log(object.a[0].b.c)
```

Result (undefined):

```json
undefined
```

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

This method is like `_.set` except that it accepts `customizer` which is
invoked to produce the objects of `path`.  If `customizer` returns `undefined`
path creation is handled by the method instead. The `customizer` is invoked
with three arguments: (nsValue, key, nsObject).

**Note:** This method mutates `object`.

- `object` (Object): The object to modify.
- `path` (Array|string): The path of the property to set.
- `value` (*): The value to set.
- `customizer` (Function, optional): The function to customize assigned values.

Returns `Object`.

```javascript
var object = {};
_.setWith(object, '[0][1]', 'a', Object)
```

Result (object):

```json
{
  "0": {
    "1": "a"
  }
}
```

### `_.toPairs(object)`

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
entries are returned.

- `object` (Object): The object to query.

Returns `Array`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.toPairs(new Foo)
```

Result (list):

```json
[
  [
    "a",
    1
  ],
  [
    "b",
    2
  ]
]
```

### `_.toPairsIn(object)`

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
or set, its entries are returned.

- `object` (Object): The object to query.

Returns `Array`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.toPairsIn(new Foo)
```

Result (list):

```json
[
  [
    "a",
    1
  ],
  [
    "b",
    2
  ]
]
```

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

An alternative to `_.reduce`; this method transforms `object` to a new
`accumulator` object which is the result of running each of its own
enumerable string keyed properties thru `iteratee`, with each invocation
potentially mutating the `accumulator` object. If `accumulator` is not
provided, a new object with the same `[[Prototype]]` will be used. The
iteratee is invoked with four arguments: (accumulator, value, key, object).
Iteratee functions may exit iteration early by explicitly returning `false`.

- `object` (Object): The object to iterate over.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.
- `accumulator` (*, optional): The custom accumulator value.

Returns `*`.

```javascript
_.transform([2, 3, 4], function(result, n) {
  result.push(n *= n);
  return n % 2 == 0;
}, [])
```

Result (list):

```json
[
  4,
  9
]
```

```javascript
_.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  (result[value] || (result[value] = [])).push(key);
}, {})
```

Result (object):

```json
{
  "1": [
    "a",
    "c"
  ],
  "2": [
    "b"
  ]
}
```

### `_.unset(object, path)`

Removes the property at `path` of `object`.

**Note:** This method mutates `object`.

- `object` (Object): The object to modify.
- `path` (Array|string): The path of the property to unset.

Returns `boolean`.

```javascript
var object = { 'a': [{ 'b': { 'c': 7 } }] };
_.unset(object, 'a[0].b.c')
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': [{ 'b': { 'c': 7 } }] };
console.log(object)
```

Result (undefined):

```json
undefined
```

```javascript
var object = { 'a': [{ 'b': { 'c': 7 } }] };
_.unset(object, ['a', '0', 'b', 'c'])
```

Result (boolean):

```json
true
```

```javascript
var object = { 'a': [{ 'b': { 'c': 7 } }] };
console.log(object)
```

Result (undefined):

```json
undefined
```

### `_.update(object, path, updater)`

This method is like `_.set` except that accepts `updater` to produce the
value to set. Use `_.updateWith` to customize `path` creation. The `updater`
is invoked with one argument: (value).

**Note:** This method mutates `object`.

- `object` (Object): The object to modify.
- `path` (Array|string): The path of the property to set.
- `updater` (Function): The function to produce the updated value.

Returns `Object`.

```javascript
var object = { 'a': [{ 'b': { 'c': 3 } }] };
console.log(object.a[0].b.c)
```

Result (undefined):

```json
undefined
```

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

This method is like `_.update` except that it accepts `customizer` which is
invoked to produce the objects of `path`.  If `customizer` returns `undefined`
path creation is handled by the method instead. The `customizer` is invoked
with three arguments: (nsValue, key, nsObject).

**Note:** This method mutates `object`.

- `object` (Object): The object to modify.
- `path` (Array|string): The path of the property to set.
- `updater` (Function): The function to produce the updated value.
- `customizer` (Function, optional): The function to customize assigned values.

Returns `Object`.

```javascript
var object = {};
_.updateWith(object, '[0][1]', _.constant('a'), Object)
```

Result (object):

```json
{
  "0": {
    "1": "a"
  }
}
```

### `_.values(object)`

Creates an array of the own enumerable string keyed property values of `object`.

**Note:** Non-object values are coerced to objects.

- `object` (Object): The object to query.

Returns `Array`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.values(new Foo)
```

Result (list):

```json
[
  1,
  2
]
```

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.values('hi')
```

Result (list):

```json
[
  "h",
  "i"
]
```

### `_.valuesIn(object)`

Creates an array of the own and inherited enumerable string keyed property
values of `object`.

**Note:** Non-object values are coerced to objects.

- `object` (Object): The object to query.

Returns `Array`.

```javascript
function Foo() {
  this.a = 1;
  this.b = 2;
};
_.valuesIn(new Foo)
```

Result (list):

```json
[
  1,
  2
]
```

## Seq

### `_.chain(value)`

Creates a `lodash` wrapper instance that wraps `value` with explicit method
chain sequences enabled. The result of such sequences must be unwrapped
with `_#value`.

- `value` (*): The value to wrap.

Returns `Object`.

### `_.tap(value, interceptor)`

This method invokes `interceptor` and returns `value`. The interceptor
is invoked with one argument; (value). The purpose of this method is to
"tap into" a method chain sequence in order to modify intermediate results.

- `value` (*): The value to provide to `interceptor`.
- `interceptor` (Function): The function to invoke.

Returns `*`.

```javascript
_([1, 2, 3])
 .tap(function(array) {
   array.pop();
 })
 .reverse()
 .value()
```

Result (list):

```json
[
  2,
  1
]
```

### `_.thru(value, interceptor)`

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
results in a method chain sequence.

- `value` (*): The value to provide to `interceptor`.
- `interceptor` (Function): The function to invoke.

Returns `*`.

```javascript
_('  abc  ')
 .chain()
 .trim()
 .thru(function(value) {
   return [value];
 })
 .value()
```

Result (list):

```json
[
  "abc"
]
```

## String

### `_.camelCase([string=''])`

Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.camelCase('Foo Bar')
```

Result (string):

```json
"fooBar"
```

```javascript
_.camelCase('--foo-bar--')
```

Result (string):

```json
"fooBar"
```

```javascript
_.camelCase('__FOO_BAR__')
```

Result (string):

```json
"fooBar"
```

### `_.capitalize([string=''])`

Converts the first character of `string` to upper case and the remaining
to lower case.

- `string` (string, optional, default ''): The string to capitalize.

Returns `string`.

```javascript
_.capitalize('FRED')
```

Result (string):

```json
"Fred"
```

### `_.deburr([string=''])`

Deburrs `string` by converting
[Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
letters to basic Latin letters and removing
[combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).

- `string` (string, optional, default ''): The string to deburr.

Returns `string`.

```javascript
_.deburr('déjà vu')
```

Result (string):

```json
"deja vu"
```

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

Checks if `string` ends with the given target string.

- `string` (string, optional, default ''): The string to inspect.
- `target` (string, optional): The string to search for.
- `position` (number, optional, default string.length): The position to search up to.

Returns `boolean`.

```javascript
_.endsWith('abc', 'c')
```

Result (boolean):

```json
true
```

```javascript
_.endsWith('abc', 'b')
```

Result (boolean):

```json
false
```

```javascript
_.endsWith('abc', 'b', 2)
```

Result (boolean):

```json
true
```

### `_.escape([string=''])`

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).

Though the ">" character is escaped for symmetry, characters like
">" and "/" don't need escaping in HTML and have no special meaning
unless they're part of a tag or unquoted attribute value. See
[Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
(under "semi-related fun fact") for more details.

When working with HTML you should always
[quote attribute values](http://wonko.com/post/html-escaping) to reduce
XSS vectors.

- `string` (string, optional, default ''): The string to escape.

Returns `string`.

```javascript
_.escape('fred, barney, & pebbles')
```

Result (string):

```json
"fred, barney, &amp; pebbles"
```

### `_.escapeRegExp([string=''])`

Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
"?", "(", ")", "[", "]", "{", "}", and "|" in `string`.

- `string` (string, optional, default ''): The string to escape.

Returns `string`.

```javascript
_.escapeRegExp('[lodash](https://lodash.com/)')
```

Result (string):

```json
"\\[lodash\\]\\(https://lodash\\.com/\\)"
```

### `_.kebabCase([string=''])`

Converts `string` to
[kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.kebabCase('Foo Bar')
```

Result (string):

```json
"foo-bar"
```

```javascript
_.kebabCase('fooBar')
```

Result (string):

```json
"foo-bar"
```

```javascript
_.kebabCase('__FOO_BAR__')
```

Result (string):

```json
"foo-bar"
```

### `_.lowerCase([string=''])`

Converts `string`, as space separated words, to lower case.

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.lowerCase('--Foo-Bar--')
```

Result (string):

```json
"foo bar"
```

```javascript
_.lowerCase('fooBar')
```

Result (string):

```json
"foo bar"
```

```javascript
_.lowerCase('__FOO_BAR__')
```

Result (string):

```json
"foo bar"
```

### `_.lowerFirst([string=''])`

Converts the first character of `string` to lower case.

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.lowerFirst('Fred')
```

Result (string):

```json
"fred"
```

```javascript
_.lowerFirst('FRED')
```

Result (string):

```json
"fRED"
```

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

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`.

- `string` (string, optional, default ''): The string to pad.
- `length` (number, optional, default 0): The padding length.
- `chars` (string, optional, default ' '): The string used as padding.

Returns `string`.

```javascript
_.pad('abc', 8)
```

Result (string):

```json
"  abc   "
```

```javascript
_.pad('abc', 8, '_-')
```

Result (string):

```json
"_-abc_-_"
```

```javascript
_.pad('abc', 3)
```

Result (string):

```json
"abc"
```

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

Pads `string` on the right side if it's shorter than `length`. Padding
characters are truncated if they exceed `length`.

- `string` (string, optional, default ''): The string to pad.
- `length` (number, optional, default 0): The padding length.
- `chars` (string, optional, default ' '): The string used as padding.

Returns `string`.

```javascript
_.padEnd('abc', 6)
```

Result (string):

```json
"abc   "
```

```javascript
_.padEnd('abc', 6, '_-')
```

Result (string):

```json
"abc_-_"
```

```javascript
_.padEnd('abc', 3)
```

Result (string):

```json
"abc"
```

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

Pads `string` on the left side if it's shorter than `length`. Padding
characters are truncated if they exceed `length`.

- `string` (string, optional, default ''): The string to pad.
- `length` (number, optional, default 0): The padding length.
- `chars` (string, optional, default ' '): The string used as padding.

Returns `string`.

```javascript
_.padStart('abc', 6)
```

Result (string):

```json
"   abc"
```

```javascript
_.padStart('abc', 6, '_-')
```

Result (string):

```json
"_-_abc"
```

```javascript
_.padStart('abc', 3)
```

Result (string):

```json
"abc"
```

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

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
hexadecimal, in which case a `radix` of `16` is used.

**Note:** This method aligns with the
[ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.

- `string` (string): The string to convert.
- `radix` (number, optional, default 10): The radix to interpret `value` by.

Returns `number`.

```javascript
_.parseInt('08')
```

Result (number):

```json
8
```

```javascript
_.map(['6', '08', '10'], _.parseInt)
```

Result (list):

```json
[
  6,
  8,
  10
]
```

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

Repeats the given string `n` times.

- `string` (string, optional, default ''): The string to repeat.
- `n` (number, optional, default 1): The number of times to repeat the string.

Returns `string`.

```javascript
_.repeat('*', 3)
```

Result (string):

```json
"***"
```

```javascript
_.repeat('abc', 2)
```

Result (string):

```json
"abcabc"
```

```javascript
_.repeat('abc', 0)
```

Result (string):

```json
""
```

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

Replaces matches for `pattern` in `string` with `replacement`.

**Note:** This method is based on
[`String#replace`](https://mdn.io/String/replace).

- `string` (string, optional, default ''): The string to modify.
- `pattern` (RegExp|string): The pattern to replace.
- `replacement` (Function|string): The match replacement.

Returns `string`.

```javascript
_.replace('Hi Fred', 'Fred', 'Barney')
```

Result (string):

```json
"Hi Barney"
```

### `_.snakeCase([string=''])`

Converts `string` to
[snake case](https://en.wikipedia.org/wiki/Snake_case).

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.snakeCase('Foo Bar')
```

Result (string):

```json
"foo_bar"
```

```javascript
_.snakeCase('fooBar')
```

Result (string):

```json
"foo_bar"
```

```javascript
_.snakeCase('--FOO-BAR--')
```

Result (string):

```json
"foo_bar"
```

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

Splits `string` by `separator`.

**Note:** This method is based on
[`String#split`](https://mdn.io/String/split).

- `string` (string, optional, default ''): The string to split.
- `separator` (RegExp|string): The separator pattern to split by.
- `limit` (number, optional): The length to truncate results to.

Returns `Array`.

```javascript
_.split('a-b-c', '-', 2)
```

Result (list):

```json
[
  "a",
  "b"
]
```

### `_.startCase([string=''])`

Converts `string` to
[start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.startCase('--foo-bar--')
```

Result (string):

```json
"Foo Bar"
```

```javascript
_.startCase('fooBar')
```

Result (string):

```json
"Foo Bar"
```

```javascript
_.startCase('__FOO_BAR__')
```

Result (string):

```json
"FOO BAR"
```

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

Checks if `string` starts with the given target string.

- `string` (string, optional, default ''): The string to inspect.
- `target` (string, optional): The string to search for.
- `position` (number, optional, default 0): The position to search from.

Returns `boolean`.

```javascript
_.startsWith('abc', 'a')
```

Result (boolean):

```json
true
```

```javascript
_.startsWith('abc', 'b')
```

Result (boolean):

```json
false
```

```javascript
_.startsWith('abc', 'b', 1)
```

Result (boolean):

```json
true
```

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

Creates a compiled template function that can interpolate data properties
in "interpolate" delimiters, HTML-escape interpolated data properties in
"escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
properties may be accessed as free variables in the template. If a setting
object is given, it takes precedence over `_.templateSettings` values.

**Security:** `_.template` is insecure and should not be used. It will be
removed in Lodash v5. Avoid untrusted input. See
[threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).

**Note:** In the development build `_.template` utilizes
[sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
for easier debugging.

For more information on precompiling templates see
[lodash's custom builds documentation](https://lodash.com/custom-builds).

For more information on Chrome extension sandboxes see
[Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).

- `string` (string, optional, default ''): The template string.
- `options` (Object, optional, default {}): The options object.
- `options.escape` (RegExp, optional, default _.templateSettings.escape): The HTML "escape" delimiter.
- `options.evaluate` (RegExp, optional, default _.templateSettings.evaluate): The "evaluate" delimiter.
- `options.imports` (Object, optional, default _.templateSettings.imports): An object to import into the template as free variables.
- `options.interpolate` (RegExp, optional, default _.templateSettings.interpolate): The "interpolate" delimiter.
- `options.sourceURL` (string, optional, default 'templateSources[n): ']
 The sourceURL of the compiled template.
- `options.variable` (string, optional, default 'obj'): The data object variable name.

Returns `Function`.

```javascript
var compiled = _.template('hello <%= user %>!');
compiled({ 'user': 'fred' })
```

Result (string):

```json
"hello fred!"
```

```javascript
var compiled = _.template('hello <%= user %>!');
var compiled = _.template('<b><%- value %></b>');
compiled({ 'value': '<script>' })
```

Result (string):

```json
"<b>&lt;script&gt;</b>"
```

```javascript
var compiled = _.template('hello <%= user %>!');
var compiled = _.template('<b><%- value %></b>');
var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
compiled({ 'users': ['fred', 'barney'] })
```

Result (string):

```json
"<li>fred</li><li>barney</li>"
```

```javascript
var compiled = _.template('hello <%= user %>!');
var compiled = _.template('<b><%- value %></b>');
var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
var compiled = _.template('<% print("hello " + user); %>!');
compiled({ 'user': 'barney' })
```

Result (string):

```json
"hello barney!"
```

### `_.toLower([string=''])`

Converts `string`, as a whole, to lower case just like
[String#toLowerCase](https://mdn.io/toLowerCase).

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.toLower('--Foo-Bar--')
```

Result (string):

```json
"--foo-bar--"
```

```javascript
_.toLower('fooBar')
```

Result (string):

```json
"foobar"
```

```javascript
_.toLower('__FOO_BAR__')
```

Result (string):

```json
"__foo_bar__"
```

### `_.toUpper([string=''])`

Converts `string`, as a whole, to upper case just like
[String#toUpperCase](https://mdn.io/toUpperCase).

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.toUpper('--foo-bar--')
```

Result (string):

```json
"--FOO-BAR--"
```

```javascript
_.toUpper('fooBar')
```

Result (string):

```json
"FOOBAR"
```

```javascript
_.toUpper('__foo_bar__')
```

Result (string):

```json
"__FOO_BAR__"
```

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

Removes leading and trailing whitespace or specified characters from `string`.

- `string` (string, optional, default ''): The string to trim.
- `chars` (string, optional, default whitespace): The characters to trim.

Returns `string`.

```javascript
_.trim('  abc  ')
```

Result (string):

```json
"abc"
```

```javascript
_.trim('-_-abc-_-', '_-')
```

Result (string):

```json
"abc"
```

```javascript
_.map(['  foo  ', '  bar  '], _.trim)
```

Result (list):

```json
[
  "foo",
  "bar"
]
```

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

Removes trailing whitespace or specified characters from `string`.

- `string` (string, optional, default ''): The string to trim.
- `chars` (string, optional, default whitespace): The characters to trim.

Returns `string`.

```javascript
_.trimEnd('  abc  ')
```

Result (string):

```json
"  abc"
```

```javascript
_.trimEnd('-_-abc-_-', '_-')
```

Result (string):

```json
"-_-abc"
```

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

Removes leading whitespace or specified characters from `string`.

- `string` (string, optional, default ''): The string to trim.
- `chars` (string, optional, default whitespace): The characters to trim.

Returns `string`.

```javascript
_.trimStart('  abc  ')
```

Result (string):

```json
"abc  "
```

```javascript
_.trimStart('-_-abc-_-', '_-')
```

Result (string):

```json
"abc-_-"
```

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

Truncates `string` if it's longer than the given maximum string length.
The last characters of the truncated string are replaced with the omission
string which defaults to "...".

- `string` (string, optional, default ''): The string to truncate.
- `options` (Object, optional, default {}): The options object.
- `options.length` (number, optional, default 30): The maximum string length.
- `options.omission` (string, optional, default '...'): The string to indicate text is omitted.
- `options.separator` (RegExp|string, optional): The separator pattern to truncate to.

Returns `string`.

```javascript
_.truncate('hi-diddly-ho there, neighborino')
```

Result (string):

```json
"hi-diddly-ho there, neighbo..."
```

```javascript
_.truncate('hi-diddly-ho there, neighborino', {
  'length': 24,
  'separator': ' '
})
```

Result (string):

```json
"hi-diddly-ho there,..."
```

```javascript
_.truncate('hi-diddly-ho there, neighborino', {
  'length': 24,
  'separator': /,? +/
})
```

Result (string):

```json
"hi-diddly-ho there..."
```

```javascript
_.truncate('hi-diddly-ho there, neighborino', {
  'omission': ' [...]'
})
```

Result (string):

```json
"hi-diddly-ho there, neig [...]"
```

### `_.unescape([string=''])`

The inverse of `_.escape`; this method converts the HTML entities
`&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
their corresponding characters.

**Note:** No other HTML entities are unescaped. To unescape additional
HTML entities use a third-party library like [_he_](https://mths.be/he).

- `string` (string, optional, default ''): The string to unescape.

Returns `string`.

```javascript
_.unescape('fred, barney, &amp; pebbles')
```

Result (string):

```json
"fred, barney, & pebbles"
```

### `_.upperCase([string=''])`

Converts `string`, as space separated words, to upper case.

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.upperCase('--foo-bar')
```

Result (string):

```json
"FOO BAR"
```

```javascript
_.upperCase('fooBar')
```

Result (string):

```json
"FOO BAR"
```

```javascript
_.upperCase('__foo_bar__')
```

Result (string):

```json
"FOO BAR"
```

### `_.upperFirst([string=''])`

Converts the first character of `string` to upper case.

- `string` (string, optional, default ''): The string to convert.

Returns `string`.

```javascript
_.upperFirst('fred')
```

Result (string):

```json
"Fred"
```

```javascript
_.upperFirst('FRED')
```

Result (string):

```json
"FRED"
```

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

Splits `string` into an array of its words.

- `string` (string, optional, default ''): The string to inspect.
- `pattern` (RegExp|string, optional): The pattern to match words.

Returns `Array`.

```javascript
_.words('fred, barney, & pebbles')
```

Result (list):

```json
[
  "fred",
  "barney",
  "pebbles"
]
```

```javascript
_.words('fred, barney, & pebbles', /[^, ]+/g)
```

Result (list):

```json
[
  "fred",
  "barney",
  "&",
  "pebbles"
]
```

## Util

### `_.attempt(func, [args])`

Attempts to invoke `func`, returning either the result or the caught error
object. Any additional arguments are provided to `func` when it's invoked.

- `func` (Function): The function to attempt.
- `args` (...*, optional): The arguments to invoke `func` with.

Returns `*`.

### `_.bindAll(object, methodNames)`

Binds methods of an object to the object itself, overwriting the existing
method.

**Note:** This method doesn't set the "length" property of bound functions.

- `object` (Object): The object to bind and assign the bound methods to.
- `methodNames` (...(string|string[])): The object method names to bind.

Returns `Object`.

### `_.cond(pairs)`

Creates a function that iterates over `pairs` and invokes the corresponding
function of the first predicate to return truthy. The predicate-function
pairs are invoked with the `this` binding and arguments of the created
function.

- `pairs` (Array): The predicate-function pairs.

Returns `Function`.

```javascript
var func = _.cond([
  [_.matches({ 'a': 1 }),           _.constant('matches A')],
  [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  [_.stubTrue,                      _.constant('no match')]
]);
func({ 'a': 1, 'b': 2 })
```

Result (string):

```json
"matches A"
```

```javascript
var func = _.cond([
  [_.matches({ 'a': 1 }),           _.constant('matches A')],
  [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  [_.stubTrue,                      _.constant('no match')]
]);
func({ 'a': 0, 'b': 1 })
```

Result (string):

```json
"matches B"
```

```javascript
var func = _.cond([
  [_.matches({ 'a': 1 }),           _.constant('matches A')],
  [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  [_.stubTrue,                      _.constant('no match')]
]);
func({ 'a': '1', 'b': '2' })
```

Result (string):

```json
"no match"
```

### `_.conforms(source)`

Creates a function that invokes the predicate properties of `source` with
the corresponding property values of a given object, returning `true` if
all predicates return truthy, else `false`.

**Note:** The created function is equivalent to `_.conformsTo` with
`source` partially applied.

- `source` (Object): The object of property predicates to conform to.

Returns `Function`.

```javascript
var objects = [
  { 'a': 2, 'b': 1 },
  { 'a': 1, 'b': 2 }
];
_.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }))
```

Result (list):

```json
[
  {
    "a": 1,
    "b": 2
  }
]
```

### `_.constant(value)`

Creates a function that returns `value`.

- `value` (*): The value to return from the new function.

Returns `Function`.

```javascript
var objects = _.times(2, _.constant({ 'a': 1 }));
console.log(objects)
```

Result (undefined):

```json
undefined
```

```javascript
var objects = _.times(2, _.constant({ 'a': 1 }));
console.log(objects[0] === objects[1])
```

Result (undefined):

```json
undefined
```

### `_.defaultTo(value, defaultValue)`

Checks `value` to determine whether a default value should be returned in
its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
or `undefined`.

- `value` (*): The value to check.
- `defaultValue` (*): The default value.

Returns `*`.

```javascript
_.defaultTo(1, 10)
```

Result (number):

```json
1
```

```javascript
_.defaultTo(undefined, 10)
```

Result (number):

```json
10
```

### `_.flow([funcs])`

Creates a function that returns the result of invoking the given functions
with the `this` binding of the created function, where each successive
invocation is supplied the return value of the previous.

- `funcs` (...(Function|Function[]), optional): The functions to invoke.

Returns `Function`.

```javascript
function square(n) {
  return n * n;
};
var addSquare = _.flow([_.add, square]);
addSquare(1, 2)
```

Result (number):

```json
9
```

### `_.flowRight([funcs])`

This method is like `_.flow` except that it creates a function that
invokes the given functions from right to left.

- `funcs` (...(Function|Function[]), optional): The functions to invoke.

Returns `Function`.

```javascript
function square(n) {
  return n * n;
};
var addSquare = _.flowRight([square, _.add]);
addSquare(1, 2)
```

Result (number):

```json
9
```

### `_.identity(value)`

This method returns the first argument it receives.

- `value` (*): Any value.

Returns `*`.

```javascript
var object = { 'a': 1 };
console.log(_.identity(object) === object)
```

Result (undefined):

```json
undefined
```

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

Creates a function that invokes `func` with the arguments of the created
function. If `func` is a property name, the created function returns the
property value for a given element. If `func` is an array or object, the
created function returns `true` for elements that contain the equivalent
source properties, otherwise it returns `false`.

- `func` (*, optional, default _.identity): The value to convert to a callback.

Returns `Function`.

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(users, _.iteratee({ 'user': 'barney', 'active': true }))
```

Result (list):

```json
[
  {
    "user": "barney",
    "age": 36,
    "active": true
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(users, _.iteratee(['user', 'fred']))
```

Result (list):

```json
[
  {
    "user": "fred",
    "age": 40,
    "active": false
  }
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.map(users, _.iteratee('user'))
```

Result (list):

```json
[
  "barney",
  "fred"
]
```

```javascript
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];
_.filter(['abc', 'def'], /ef/)
```

Result (list):

```json
[
  "abc",
  "def"
]
```

### `_.matches(source)`

Creates a function that performs a partial deep comparison between a given
object and `source`, returning `true` if the given object has equivalent
property values, else `false`.

**Note:** The created function is equivalent to `_.isMatch` with `source`
partially applied.

Partial comparisons will match empty array and empty object `source`
values against any array or object value, respectively. See `_.isEqual`
for a list of supported value comparisons.

**Note:** Multiple values can be checked by combining several matchers
using `_.overSome`

- `source` (Object): The object of property values to match.

Returns `Function`.

```javascript
var objects = [
  { 'a': 1, 'b': 2, 'c': 3 },
  { 'a': 4, 'b': 5, 'c': 6 }
];
_.filter(objects, _.matches({ 'a': 4, 'c': 6 }))
```

Result (list):

```json
[
  {
    "a": 4,
    "b": 5,
    "c": 6
  }
]
```

```javascript
var objects = [
  { 'a': 1, 'b': 2, 'c': 3 },
  { 'a': 4, 'b': 5, 'c': 6 }
];
_.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]))
```

Result (list):

```json
[
  {
    "a": 1,
    "b": 2,
    "c": 3
  },
  {
    "a": 4,
    "b": 5,
    "c": 6
  }
]
```

### `_.matchesProperty(path, srcValue)`

Creates a function that performs a partial deep comparison between the
value at `path` of a given object to `srcValue`, returning `true` if the
object value is equivalent, else `false`.

**Note:** Partial comparisons will match empty array and empty object
`srcValue` values against any array or object value, respectively. See
`_.isEqual` for a list of supported value comparisons.

**Note:** Multiple values can be checked by combining several matchers
using `_.overSome`

- `path` (Array|string): The path of the property to get.
- `srcValue` (*): The value to match.

Returns `Function`.

```javascript
var objects = [
  { 'a': 1, 'b': 2, 'c': 3 },
  { 'a': 4, 'b': 5, 'c': 6 }
];
_.find(objects, _.matchesProperty('a', 4))
```

Result (object):

```json
{
  "a": 4,
  "b": 5,
  "c": 6
}
```

```javascript
var objects = [
  { 'a': 1, 'b': 2, 'c': 3 },
  { 'a': 4, 'b': 5, 'c': 6 }
];
_.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]))
```

Result (list):

```json
[
  {
    "a": 1,
    "b": 2,
    "c": 3
  },
  {
    "a": 4,
    "b": 5,
    "c": 6
  }
]
```

### `_.method(path, [args])`

Creates a function that invokes the method at `path` of a given object.
Any additional arguments are provided to the invoked method.

- `path` (Array|string): The path of the method to invoke.
- `args` (...*, optional): The arguments to invoke the method with.

Returns `Function`.

```javascript
var objects = [
  { 'a': { 'b': _.constant(2) } },
  { 'a': { 'b': _.constant(1) } }
];
_.map(objects, _.method('a.b'))
```

Result (list):

```json
[
  2,
  1
]
```

```javascript
var objects = [
  { 'a': { 'b': _.constant(2) } },
  { 'a': { 'b': _.constant(1) } }
];
_.map(objects, _.method(['a', 'b']))
```

Result (list):

```json
[
  2,
  1
]
```

### `_.methodOf(object, [args])`

The opposite of `_.method`; this method creates a function that invokes
the method at a given path of `object`. Any additional arguments are
provided to the invoked method.

- `object` (Object): The object to query.
- `args` (...*, optional): The arguments to invoke the method with.

Returns `Function`.

```javascript
var array = _.times(3, _.constant),
    object = { 'a': array, 'b': array, 'c': array };
_.map(['a[2]', 'c[0]'], _.methodOf(object))
```

Result (list):

```json
[
  2,
  0
]
```

```javascript
var array = _.times(3, _.constant),
    object = { 'a': array, 'b': array, 'c': array };
_.map([['a', '2'], ['c', '0']], _.methodOf(object))
```

Result (list):

```json
[
  2,
  0
]
```

### `_.noop()`

This method returns `undefined`.

```javascript
_.times(2, _.noop)
```

Result (list):

```json
[
  null,
  null
]
```

### `_.nthArg([n=0])`

Creates a function that gets the argument at index `n`. If `n` is negative,
the nth argument from the end is returned.

- `n` (number, optional, default 0): The index of the argument to return.

Returns `Function`.

```javascript
var func = _.nthArg(1);
func('a', 'b', 'c', 'd')
```

Result (string):

```json
"b"
```

```javascript
var func = _.nthArg(1);
var func = _.nthArg(-2);
func('a', 'b', 'c', 'd')
```

Result (string):

```json
"c"
```

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

Creates a function that invokes `iteratees` with the arguments it receives
and returns their results.

- `iteratees` (...(Function|Function[]), optional, default [_.identity): ]
 The iteratees to invoke.

Returns `Function`.

```javascript
var func = _.over([Math.max, Math.min]);
func(1, 2, 3, 4)
```

Result (list):

```json
[
  4,
  1
]
```

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

Creates a function that checks if **all** of the `predicates` return
truthy when invoked with the arguments it receives.

Following shorthands are possible for providing predicates.
Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.

- `predicates` (...(Function|Function[]), optional, default [_.identity): ]
 The predicates to check.

Returns `Function`.

```javascript
var func = _.overEvery([Boolean, isFinite]);
func('1')
```

Result (boolean):

```json
true
```

```javascript
var func = _.overEvery([Boolean, isFinite]);
func(null)
```

Result (boolean):

```json
false
```

```javascript
var func = _.overEvery([Boolean, isFinite]);
func(NaN)
```

Result (boolean):

```json
false
```

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

Creates a function that checks if **any** of the `predicates` return
truthy when invoked with the arguments it receives.

Following shorthands are possible for providing predicates.
Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.

- `predicates` (...(Function|Function[]), optional, default [_.identity): ]
 The predicates to check.

Returns `Function`.

```javascript
var func = _.overSome([Boolean, isFinite]);
func('1')
```

Result (boolean):

```json
true
```

```javascript
var func = _.overSome([Boolean, isFinite]);
func(null)
```

Result (boolean):

```json
true
```

```javascript
var func = _.overSome([Boolean, isFinite]);
func(NaN)
```

Result (boolean):

```json
false
```

### `_.property(path)`

Creates a function that returns the value at `path` of a given object.

- `path` (Array|string): The path of the property to get.

Returns `Function`.

```javascript
var objects = [
  { 'a': { 'b': 2 } },
  { 'a': { 'b': 1 } }
];
_.map(objects, _.property('a.b'))
```

Result (list):

```json
[
  2,
  1
]
```

```javascript
var objects = [
  { 'a': { 'b': 2 } },
  { 'a': { 'b': 1 } }
];
_.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b')
```

Result (list):

```json
[
  1,
  2
]
```

### `_.propertyOf(object)`

The opposite of `_.property`; this method creates a function that returns
the value at a given path of `object`.

- `object` (Object): The object to query.

Returns `Function`.

```javascript
var array = [0, 1, 2],
    object = { 'a': array, 'b': array, 'c': array };
_.map(['a[2]', 'c[0]'], _.propertyOf(object))
```

Result (list):

```json
[
  2,
  0
]
```

```javascript
var array = [0, 1, 2],
    object = { 'a': array, 'b': array, 'c': array };
_.map([['a', '2'], ['c', '0']], _.propertyOf(object))
```

Result (list):

```json
[
  2,
  0
]
```

### `_.range([start=0], end, [step=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
`start` is specified without an `end` or `step`. If `end` is not specified,
it's set to `start` with `start` then set to `0`.

**Note:** JavaScript follows the IEEE-754 standard for resolving
floating-point values which can produce unexpected results.

- `start` (number, optional, default 0): The start of the range.
- `end` (number): The end of the range.
- `step` (number, optional, default 1): The value to increment or decrement by.

Returns `Array`.

```javascript
_.range(4)
```

Result (list):

```json
[
  0,
  1,
  2,
  3
]
```

```javascript
_.range(-4)
```

Result (list):

```json
[
  0,
  -1,
  -2,
  -3
]
```

```javascript
_.range(1, 5)
```

Result (list):

```json
[
  1,
  2,
  3,
  4
]
```

```javascript
_.range(0, 20, 5)
```

Result (list):

```json
[
  0,
  5,
  10,
  15
]
```

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

This method is like `_.range` except that it populates values in
descending order.

- `start` (number, optional, default 0): The start of the range.
- `end` (number): The end of the range.
- `step` (number, optional, default 1): The value to increment or decrement by.

Returns `Array`.

```javascript
_.rangeRight(4)
```

Result (list):

```json
[
  3,
  2,
  1,
  0
]
```

```javascript
_.rangeRight(-4)
```

Result (list):

```json
[
  -3,
  -2,
  -1,
  0
]
```

```javascript
_.rangeRight(1, 5)
```

Result (list):

```json
[
  4,
  3,
  2,
  1
]
```

```javascript
_.rangeRight(0, 20, 5)
```

Result (list):

```json
[
  15,
  10,
  5,
  0
]
```

### `_.stubArray()`

This method returns a new empty array.

Returns `Array`.

```javascript
var arrays = _.times(2, _.stubArray);
console.log(arrays)
```

Result (undefined):

```json
undefined
```

```javascript
var arrays = _.times(2, _.stubArray);
console.log(arrays[0] === arrays[1])
```

Result (undefined):

```json
undefined
```

### `_.stubFalse()`

This method returns `false`.

Returns `boolean`.

```javascript
_.times(2, _.stubFalse)
```

Result (list):

```json
[
  false,
  false
]
```

### `_.stubObject()`

This method returns a new empty object.

Returns `Object`.

```javascript
var objects = _.times(2, _.stubObject);
console.log(objects)
```

Result (undefined):

```json
undefined
```

```javascript
var objects = _.times(2, _.stubObject);
console.log(objects[0] === objects[1])
```

Result (undefined):

```json
undefined
```

### `_.stubString()`

This method returns an empty string.

Returns `string`.

```javascript
_.times(2, _.stubString)
```

Result (list):

```json
[
  "",
  ""
]
```

### `_.stubTrue()`

This method returns `true`.

Returns `boolean`.

```javascript
_.times(2, _.stubTrue)
```

Result (list):

```json
[
  true,
  true
]
```

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

Invokes the iteratee `n` times, returning an array of the results of
each invocation. The iteratee is invoked with one argument; (index).

- `n` (number): The number of times to invoke `iteratee`.
- `iteratee` (Function, optional, default _.identity): The function invoked per iteration.

Returns `Array`.

```javascript
_.times(3, String)
```

Result (list):

```json
[
  "0",
  "1",
  "2"
]
```

```javascript
_.times(4, _.constant(0))
```

Result (list):

```json
[
  0,
  0,
  0,
  0
]
```

### `_.toPath(value)`

Converts `value` to a property path array.

- `value` (*): The value to convert.

Returns `Array`.

```javascript
_.toPath('a.b.c')
```

Result (list):

```json
[
  "a",
  "b",
  "c"
]
```

```javascript
_.toPath('a[0].b.c')
```

Result (list):

```json
[
  "a",
  "0",
  "b",
  "c"
]
```

### `_.uniqueId([prefix=''])`

Generates a unique ID. If `prefix` is given, the ID is appended to it.

- `prefix` (string, optional, default ''): The value to prefix the ID with.

Returns `string`.

```javascript
_.uniqueId('contact_')
```

Result (string):

```json
"contact_1"
```

```javascript
_.uniqueId()
```

Result (string):

```json
"2"
```
