UNPKG

lodash-snippets

Version:
1,040 lines 88 kB
{ "Adds two numbers.": { "prefix": "add", "body": [ "_.add(${augend}, ${addend});" ] }, "The opposite of `_.before`; this method creates a function that invokes\n`func` once it's called `n` or more times.": { "prefix": "after", "body": [ "_.after(${n}, ${func});" ] }, "Creates a function that invokes `func`, with up to `n` arguments,\nignoring any additional arguments.": { "prefix": "ary", "body": [ "_.ary(${func}, ${n});" ] }, "Assigns own enumerable string keyed properties of source objects to the\ndestination object. Source objects are applied from left to right.\nSubsequent sources overwrite property assignments of previous sources.\n\n**Note:** This method mutates `object` and is loosely based on\n[`Object.assign`](https://mdn.io/Object/assign).": { "prefix": "assign", "body": [ "_.assign(${object}, ${sources});" ] }, "This method is like `_.assign` except that it iterates over own and\ninherited source properties.\n\n**Note:** This method mutates `object`.": { "prefix": "extend", "body": [ "_.extend(${object}, ${sources});" ] }, "This method is like `_.assignIn` except that it accepts `customizer`\nwhich is invoked to produce the assigned values. If `customizer` returns\n`undefined`, assignment is handled by the method instead. The `customizer`\nis invoked with five arguments: (objValue, srcValue, key, object, source).\n\n**Note:** This method mutates `object`.": { "prefix": "extendWith", "body": [ "_.extendWith(${object}, ${sources}, ${customizer});" ] }, "This method is like `_.assign` except that it accepts `customizer`\nwhich is invoked to produce the assigned values. If `customizer` returns\n`undefined`, assignment is handled by the method instead. The `customizer`\nis invoked with five arguments: (objValue, srcValue, key, object, source).\n\n**Note:** This method mutates `object`.": { "prefix": "assignWith", "body": [ "_.assignWith(${object}, ${sources}, ${customizer});" ] }, "Creates an array of values corresponding to `paths` of `object`.": { "prefix": "at", "body": [ "_.at(${object}, ${paths});" ] }, "Attempts to invoke `func`, returning either the result or the caught error\nobject. Any additional arguments are provided to `func` when it's invoked.": { "prefix": "attempt", "body": [ "_.attempt(${func}, ${args});" ] }, "Creates a function that invokes `func`, with the `this` binding and arguments\nof the created function, while it's called less than `n` times. Subsequent\ncalls to the created function return the result of the last `func` invocation.": { "prefix": "before", "body": [ "_.before(${n}, ${func});" ] }, "Creates a function that invokes `func` with the `this` binding of `thisArg`\nand `partials` prepended to the arguments it receives.\n\nThe `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\nmay be used as a placeholder for partially applied arguments.\n\n**Note:** Unlike native `Function#bind` this method doesn't set the \"length\"\nproperty of bound functions.": { "prefix": "bind", "body": [ "_.bind(${func}, ${thisArg}, ${partials});" ] }, "Binds methods of an object to the object itself, overwriting the existing\nmethod.\n\n**Note:** This method doesn't set the \"length\" property of bound functions.": { "prefix": "bindAll", "body": [ "_.bindAll(${object}, ${methodNames});" ] }, "Creates a function that invokes the method at `object[key]` with `partials`\nprepended to the arguments it receives.\n\nThis method differs from `_.bind` by allowing bound functions to reference\nmethods that may be redefined or don't yet exist. See\n[Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\nfor more details.\n\nThe `_.bindKey.placeholder` value, which defaults to `_` in monolithic\nbuilds, may be used as a placeholder for partially applied arguments.": { "prefix": "bindKey", "body": [ "_.bindKey(${object}, ${key}, ${partials});" ] }, "Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).": { "prefix": "camelCase", "body": [ "_.camelCase(${string});" ] }, "Converts the first character of `string` to upper case and the remaining\nto lower case.": { "prefix": "capitalize", "body": [ "_.capitalize(${string});" ] }, "Casts `value` as an array if it's not one.": { "prefix": "castArray", "body": [ "_.castArray(${value});" ] }, "Computes `number` rounded up to `precision`.": { "prefix": "ceil", "body": [ "_.ceil(${number}, ${precision});" ] }, "Creates a `lodash` wrapper instance that wraps `value` with explicit method\nchain sequences enabled. The result of such sequences must be unwrapped\nwith `_#value`.": { "prefix": "chain", "body": [ "_.chain(${value});" ] }, "Creates an array of elements split into groups the length of `size`.\nIf `array` can't be split evenly, the final chunk will be the remaining\nelements.": { "prefix": "chunk", "body": [ "_.chunk(${array}, ${size});" ] }, "Clamps `number` within the inclusive `lower` and `upper` bounds.": { "prefix": "clamp", "body": [ "_.clamp(${number}, ${lower}, ${upper});" ] }, "Creates a shallow clone of `value`.\n\n**Note:** This method is loosely based on the\n[structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\nand supports cloning arrays, array buffers, booleans, date objects, maps,\nnumbers, `Object` objects, regexes, sets, strings, symbols, and typed\narrays. The own enumerable properties of `arguments` objects are cloned\nas plain objects. An empty object is returned for uncloneable values such\nas error objects, functions, DOM nodes, and WeakMaps.": { "prefix": "clone", "body": [ "_.clone(${value});" ] }, "This method is like `_.clone` except that it recursively clones `value`.": { "prefix": "cloneDeep", "body": [ "_.cloneDeep(${value});" ] }, "This method is like `_.cloneWith` except that it recursively clones `value`.": { "prefix": "cloneDeepWith", "body": [ "_.cloneDeepWith(${value}, ${customizer});" ] }, "This method is like `_.clone` except that it accepts `customizer` which\nis invoked to produce the cloned value. If `customizer` returns `undefined`,\ncloning is handled by the method instead. The `customizer` is invoked with\nup to four arguments; (value [, index|key, object, stack]).": { "prefix": "cloneWith", "body": [ "_.cloneWith(${value}, ${customizer});" ] }, "Executes the chain sequence and returns the wrapped result.": { "prefix": "commit", "body": [ "_.commit();" ] }, "Creates an array with all falsey values removed. The values `false`, `null`,\n`0`, `\"\"`, `undefined`, and `NaN` are falsey.": { "prefix": "compact", "body": [ "_.compact(${array});" ] }, "Creates a new array concatenating `array` with any additional arrays\nand/or values.": { "prefix": "concat", "body": [ "_.concat(${array}, ${values});" ] }, "Creates a function that iterates over `pairs` and invokes the corresponding\nfunction of the first predicate to return truthy. The predicate-function\npairs are invoked with the `this` binding and arguments of the created\nfunction.": { "prefix": "cond", "body": [ "_.cond(${pairs});" ] }, "Creates a function that invokes the predicate properties of `source` with\nthe corresponding property values of a given object, returning `true` if\nall predicates return truthy, else `false`.": { "prefix": "conforms", "body": [ "_.conforms(${source});" ] }, "Creates a function that returns `value`.": { "prefix": "constant", "body": [ "_.constant(${value});" ] }, "Flattens `array` a single level deep.": { "prefix": "flatten", "body": [ "_.flatten(${array});" ] }, "Recursively flattens `array`.": { "prefix": "flattenDeep", "body": [ "_.flattenDeep(${array});" ] }, "Gets the first element of `array`.": { "prefix": "first", "body": [ "_.first(${array});" ] }, "Gets the index at which the first occurrence of `value` is found in `array`\nusing [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\nfor equality comparisons. If `fromIndex` is negative, it's used as the\noffset from the end of `array`.": { "prefix": "indexOf", "body": [ "_.indexOf(${array}, ${value}, ${fromIndex});" ] }, "Gets the last element of `array`.": { "prefix": "last", "body": [ "_.last(${array});" ] }, "Creates a slice of `array` from `start` up to, but not including, `end`.\n\n**Note:** This method is used instead of\n[`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\nreturned.": { "prefix": "slice", "body": [ "_.slice(${array}, ${start}, ${end});" ] }, "This method invokes `interceptor` and returns `value`. The interceptor\nis invoked with one argument; (value). The purpose of this method is to\n\"tap into\" a method chain sequence in order to modify intermediate results.": { "prefix": "tap", "body": [ "_.tap(${value}, ${interceptor});" ] }, "This method is like `_.tap` except that it returns the result of `interceptor`.\nThe purpose of this method is to \"pass thru\" values replacing intermediate\nresults in a method chain sequence.": { "prefix": "thru", "body": [ "_.thru(${value}, ${interceptor});" ] }, "Creates a `lodash` wrapper instance with explicit method chain sequences enabled.": { "prefix": "chain", "body": [ "_.chain();" ] }, "Executes the chain sequence to resolve the unwrapped value.": { "prefix": "value", "body": [ "_.value();" ] }, "Checks if `predicate` returns truthy for **all** elements of `collection`.\nIteration is stopped once `predicate` returns falsey. The predicate is\ninvoked with three arguments: (value, index|key, collection).": { "prefix": "every", "body": [ "_.every(${collection}, ${predicate});" ] }, "Iterates over elements of `collection`, returning an array of all elements\n`predicate` returns truthy for. The predicate is invoked with three\narguments: (value, index|key, collection).": { "prefix": "filter", "body": [ "_.filter(${collection}, ${predicate});" ] }, "Iterates over elements of `collection`, returning the first element\n`predicate` returns truthy for. The predicate is invoked with three\narguments: (value, index|key, collection).": { "prefix": "find", "body": [ "_.find(${collection}, ${predicate});" ] }, "Iterates over elements of `collection` and invokes `iteratee` for each element.\nThe iteratee is invoked with three arguments: (value, index|key, collection).\nIteratee functions may exit iteration early by explicitly returning `false`.\n\n**Note:** As with other \"Collections\" methods, objects with a \"length\"\nproperty are iterated like arrays. To avoid this behavior use `_.forIn`\nor `_.forOwn` for object iteration.": { "prefix": "each", "body": [ "_.each(${collection}, ${iteratee});" ] }, "Creates an array of values by running each element in `collection` thru\n`iteratee`. The iteratee is invoked with three arguments:\n(value, index|key, collection).\n\nMany lodash methods are guarded to work as iteratees for methods like\n`_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n\nThe guarded methods are:\n`ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n`fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n`sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n`template`, `trim`, `trimEnd`, `trimStart`, and `words`": { "prefix": "map", "body": [ "_.map(${collection}, ${iteratee});" ] }, "Reduces `collection` to a value which is the accumulated result of running\neach element in `collection` thru `iteratee`, where each successive\ninvocation is supplied the return value of the previous. If `accumulator`\nis not given, the first element of `collection` is used as the initial\nvalue. The iteratee is invoked with four arguments:\n(accumulator, value, index|key, collection).\n\nMany lodash methods are guarded to work as iteratees for methods like\n`_.reduce`, `_.reduceRight`, and `_.transform`.\n\nThe guarded methods are:\n`assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\nand `sortBy`": { "prefix": "reduce", "body": [ "_.reduce(${collection}, ${iteratee}, ${accumulator});" ] }, "Gets the size of `collection` by returning its length for array-like\nvalues or the number of own enumerable string keyed properties for objects.": { "prefix": "size", "body": [ "_.size(${collection});" ] }, "Checks if `predicate` returns truthy for **any** element of `collection`.\nIteration is stopped once `predicate` returns truthy. The predicate is\ninvoked with three arguments: (value, index|key, collection).": { "prefix": "some", "body": [ "_.some(${collection}, ${predicate});" ] }, "Creates an array of elements, sorted in ascending order by the results of\nrunning each element in a collection thru each iteratee. This method\nperforms a stable sort, that is, it preserves the original sort order of\nequal elements. The iteratees are invoked with one argument: (value).": { "prefix": "sortBy", "body": [ "_.sortBy(${collection}, ${iteratees});" ] }, "Defers invoking the `func` until the current call stack has cleared. Any\nadditional arguments are provided to `func` when it's invoked.": { "prefix": "defer", "body": [ "_.defer(${func}, ${args});" ] }, "Invokes `func` after `wait` milliseconds. Any additional arguments are\nprovided to `func` when it's invoked.": { "prefix": "delay", "body": [ "_.delay(${func}, ${wait}, ${args});" ] }, "Creates a function that negates the result of the predicate `func`. The\n`func` predicate is invoked with the `this` binding and arguments of the\ncreated function.": { "prefix": "negate", "body": [ "_.negate(${predicate});" ] }, "Creates a function that is restricted to invoking `func` once. Repeat calls\nto the function return the value of the first invocation. The `func` is\ninvoked with the `this` binding and arguments of the created function.": { "prefix": "once", "body": [ "_.once(${func});" ] }, "Creates a function that invokes `func` with the `this` binding of the\ncreated function and arguments from `start` and beyond provided as\nan array.\n\n**Note:** This method is based on the\n[rest parameter](https://mdn.io/rest_parameters).": { "prefix": "rest", "body": [ "_.rest(${func}, ${start});" ] }, "Performs a\n[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\ncomparison between two values to determine if they are equivalent.": { "prefix": "eq", "body": [ "_.eq(${value}, ${other});" ] }, "Checks if `value` is likely an `arguments` object.": { "prefix": "isArguments", "body": [ "_.isArguments(${value});" ] }, "Checks if `value` is classified as an `Array` object.": { "prefix": "isArray", "body": [ "_.isArray(${value});" ] }, "Checks if `value` is array-like. A value is considered array-like if it's\nnot a function and has a `value.length` that's an integer greater than or\nequal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.": { "prefix": "isArrayLike", "body": [ "_.isArrayLike(${value});" ] }, "This method is like `_.isArrayLike` except that it also checks if `value`\nis an object.": { "prefix": "isArrayLikeObject", "body": [ "_.isArrayLikeObject(${value});" ] }, "Checks if `value` is classified as a boolean primitive or object.": { "prefix": "isBoolean", "body": [ "_.isBoolean(${value});" ] }, "Checks if `value` is classified as a `Date` object.": { "prefix": "isDate", "body": [ "_.isDate(${value});" ] }, "Checks if `value` is an empty object, collection, map, or set.\n\nObjects are considered empty if they have no own enumerable string keyed\nproperties.\n\nArray-like values such as `arguments` objects, arrays, buffers, strings, or\njQuery-like collections are considered empty if they have a `length` of `0`.\nSimilarly, maps and sets are considered empty if they have a `size` of `0`.": { "prefix": "isEmpty", "body": [ "_.isEmpty(${value});" ] }, "Performs a deep comparison between two values to determine if they are\nequivalent.\n\n**Note:** This method supports comparing arrays, array buffers, booleans,\ndate objects, error objects, maps, numbers, `Object` objects, regexes,\nsets, strings, symbols, and typed arrays. `Object` objects are compared\nby their own, not inherited, enumerable properties. Functions and DOM\nnodes are **not** supported.": { "prefix": "isEqual", "body": [ "_.isEqual(${value}, ${other});" ] }, "Checks if `value` is a finite primitive number.\n\n**Note:** This method is based on\n[`Number.isFinite`](https://mdn.io/Number/isFinite).": { "prefix": "isFinite", "body": [ "_.isFinite(${value});" ] }, "Checks if `value` is classified as a `Function` object.": { "prefix": "isFunction", "body": [ "_.isFunction(${value});" ] }, "Checks if `value` is a valid array-like length.\n\n**Note:** This function is loosely based on\n[`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).": { "prefix": "isLength", "body": [ "_.isLength(${value});" ] }, "Checks if `value` is the\n[language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)\nof `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)": { "prefix": "isObject", "body": [ "_.isObject(${value});" ] }, "Checks if `value` is object-like. A value is object-like if it's not `null`\nand has a `typeof` result of \"object\".": { "prefix": "isObjectLike", "body": [ "_.isObjectLike(${value});" ] }, "Checks if `value` is `NaN`.\n\n**Note:** This method is based on\n[`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\nglobal [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n`undefined` and other non-number values.": { "prefix": "isNaN", "body": [ "_.isNaN(${value});" ] }, "Checks if `value` is `null`.": { "prefix": "isNull", "body": [ "_.isNull(${value});" ] }, "Checks if `value` is classified as a `Number` primitive or object.\n\n**Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\nclassified as numbers, use the `_.isFinite` method.": { "prefix": "isNumber", "body": [ "_.isNumber(${value});" ] }, "Checks if `value` is classified as a `RegExp` object.": { "prefix": "isRegExp", "body": [ "_.isRegExp(${value});" ] }, "Checks if `value` is classified as a `String` primitive or object.": { "prefix": "isString", "body": [ "_.isString(${value});" ] }, "Checks if `value` is `undefined`.": { "prefix": "isUndefined", "body": [ "_.isUndefined(${value});" ] }, "Converts `value` to an array.": { "prefix": "toArray", "body": [ "_.toArray(${value});" ] }, "Converts `value` to an integer.\n\n**Note:** This function is loosely based on\n[`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).": { "prefix": "toInteger", "body": [ "_.toInteger(${value});" ] }, "Converts `value` to a number.": { "prefix": "toNumber", "body": [ "_.toNumber(${value});" ] }, "Converts `value` to a string. An empty string is returned for `null`\nand `undefined` values. The sign of `-0` is preserved.": { "prefix": "toString", "body": [ "_.toString(${value});" ] }, "Creates an object that inherits from the `prototype` object. If a\n`properties` object is given, its own enumerable string keyed properties\nare assigned to the created object.": { "prefix": "create", "body": [ "_.create(${prototype}, ${properties});" ] }, "Assigns own and inherited enumerable string keyed properties of source\nobjects to the destination object for all destination properties that\nresolve to `undefined`. Source objects are applied from left to right.\nOnce a property is set, additional values of the same property are ignored.\n\n**Note:** This method mutates `object`.": { "prefix": "defaults", "body": [ "_.defaults(${object}, ${sources});" ] }, "Checks if `path` is a direct property of `object`.": { "prefix": "has", "body": [ "_.has(${object}, ${path});" ] }, "Creates an array of the own enumerable property names of `object`.\n\n**Note:** Non-object values are coerced to objects. See the\n[ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\nfor more details.": { "prefix": "keys", "body": [ "_.keys(${object});" ] }, "Creates an array of the own and inherited enumerable property names of `object`.\n\n**Note:** Non-object values are coerced to objects.": { "prefix": "keysIn", "body": [ "_.keysIn(${object});" ] }, "Creates an object composed of the picked `object` properties.": { "prefix": "pick", "body": [ "_.pick(${object}, ${props});" ] }, "This method is like `_.get` except that if the resolved value is a\nfunction it's invoked with the `this` binding of its parent object and\nits result is returned.": { "prefix": "result", "body": [ "_.result(${object}, ${path}, ${defaultValue});" ] }, "Creates an array of the own enumerable string keyed property values of `object`.\n\n**Note:** Non-object values are coerced to objects.": { "prefix": "values", "body": [ "_.values(${object});" ] }, "Converts the characters \"&\", \"<\", \">\", '\"', \"'\", and \"\\`\" in `string` to\ntheir corresponding HTML entities.\n\n**Note:** No other characters are escaped. To escape additional\ncharacters use a third-party library like [_he_](https://mths.be/he).\n\nThough the \">\" character is escaped for symmetry, characters like\n\">\" and \"/\" don't need escaping in HTML and have no special meaning\nunless they're part of a tag or unquoted attribute value. See\n[Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n(under \"semi-related fun fact\") for more details.\n\nBackticks are escaped because in IE < 9, they can break out of\nattribute values or HTML comments. See [#59](https://html5sec.org/#59),\n[#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and\n[#133](https://html5sec.org/#133) of the\n[HTML5 Security Cheatsheet](https://html5sec.org/) for more details.\n\nWhen working with HTML you should always\n[quote attribute values](http://wonko.com/post/html-escaping) to reduce\nXSS vectors.": { "prefix": "escape", "body": [ "_.escape(${string});" ] }, "This method returns the first argument given to it.": { "prefix": "identity", "body": [ "_.identity(${value});" ] }, "Creates a function that invokes `func` with the arguments of the created\nfunction. If `func` is a property name, the created function returns the\nproperty value for a given element. If `func` is an array or object, the\ncreated function returns `true` for elements that contain the equivalent\nsource properties, otherwise it returns `false`.": { "prefix": "iteratee", "body": [ "_.iteratee(${func});" ] }, "Creates a function that performs a partial deep comparison between a given\nobject and `source`, returning `true` if the given object has equivalent\nproperty values, else `false`. The created function is equivalent to\n`_.isMatch` with a `source` partially applied.\n\n**Note:** This method supports comparing the same values as `_.isEqual`.": { "prefix": "matches", "body": [ "_.matches(${source});" ] }, "Adds all own enumerable string keyed function properties of a source\nobject to the destination object. If `object` is a function, then methods\nare added to its prototype as well.\n\n**Note:** Use `_.runInContext` to create a pristine `lodash` function to\navoid conflicts caused by modifying the original.": { "prefix": "mixin", "body": [ "_.mixin(${object}, ${source}, ${options}, ${options.chain});" ] }, "Reverts the `_` variable to its previous value and returns a reference to\nthe `lodash` function.": { "prefix": "noConflict", "body": [ "_.noConflict();" ] }, "A no-operation function that returns `undefined` regardless of the\narguments it receives.": { "prefix": "noop", "body": [ "_.noop();" ] }, "Generates a unique ID. If `prefix` is given, the ID is appended to it.": { "prefix": "uniqueId", "body": [ "_.uniqueId(${prefix});" ] }, "Computes the maximum value of `array`. If `array` is empty or falsey,\n`undefined` is returned.": { "prefix": "max", "body": [ "_.max(${array});" ] }, "Computes the minimum value of `array`. If `array` is empty or falsey,\n`undefined` is returned.": { "prefix": "min", "body": [ "_.min(${array});" ] }, "Creates an object composed of keys generated from the results of running\neach element of `collection` thru `iteratee`. The corresponding value of\neach key is the number of times the key was returned by `iteratee`. The\niteratee is invoked with one argument: (value).": { "prefix": "countBy", "body": [ "_.countBy(${collection}, ${iteratee});" ] }, "Creates a function that accepts arguments of `func` and either invokes\n`func` returning its result, if at least `arity` number of arguments have\nbeen provided, or returns a function that accepts the remaining `func`\narguments, and so on. The arity of `func` may be specified if `func.length`\nis not sufficient.\n\nThe `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\nmay be used as a placeholder for provided arguments.\n\n**Note:** This method doesn't set the \"length\" property of curried functions.": { "prefix": "curry", "body": [ "_.curry(${func}, ${arity});" ] }, "This method is like `_.curry` except that arguments are applied to `func`\nin the manner of `_.partialRight` instead of `_.partial`.\n\nThe `_.curryRight.placeholder` value, which defaults to `_` in monolithic\nbuilds, may be used as a placeholder for provided arguments.\n\n**Note:** This method doesn't set the \"length\" property of curried functions.": { "prefix": "curryRight", "body": [ "_.curryRight(${func}, ${arity});" ] }, "Creates a debounced function that delays invoking `func` until after `wait`\nmilliseconds have elapsed since the last time the debounced function was\ninvoked. The debounced function comes with a `cancel` method to cancel\ndelayed `func` invocations and a `flush` method to immediately invoke them.\nProvide an options object to indicate whether `func` should be invoked on\nthe leading and/or trailing edge of the `wait` timeout. The `func` is invoked\nwith the last arguments provided to the debounced function. Subsequent calls\nto the debounced function return the result of the last `func` invocation.\n\n**Note:** If `leading` and `trailing` options are `true`, `func` is invoked\non the trailing edge of the timeout only if the debounced function is\ninvoked more than once during the `wait` timeout.\n\nSee [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\nfor details over the differences between `_.debounce` and `_.throttle`.": { "prefix": "debounce", "body": [ "_.debounce(${func}, ${wait}, ${options}, ${options.leading}, ${options.maxWait}, ${options.trailing});" ] }, "Deburrs `string` by converting\n[latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\nto basic latin letters and removing\n[combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).": { "prefix": "deburr", "body": [ "_.deburr(${string});" ] }, "This method is like `_.defaults` except that it recursively assigns\ndefault properties.\n\n**Note:** This method mutates `object`.": { "prefix": "defaultsDeep", "body": [ "_.defaultsDeep(${object}, ${sources});" ] }, "Creates an array of unique `array` values not included in the other given\narrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\nfor equality comparisons. The order of result values is determined by the\norder they occur in the first array.": { "prefix": "difference", "body": [ "_.difference(${array}, ${values});" ] }, "This method is like `_.difference` except that it accepts `iteratee` which\nis invoked for each element of `array` and `values` to generate the criterion\nby which they're compared. Result values are chosen from the first array.\nThe iteratee is invoked with one argument: (value).": { "prefix": "differenceBy", "body": [ "_.differenceBy(${array}, ${values}, ${iteratee});" ] }, "This method is like `_.difference` except that it accepts `comparator`\nwhich is invoked to compare elements of `array` to `values`. Result values\nare chosen from the first array. The comparator is invoked with two arguments:\n(arrVal, othVal).": { "prefix": "differenceWith", "body": [ "_.differenceWith(${array}, ${values}, ${comparator});" ] }, "Divide two numbers.": { "prefix": "divide", "body": [ "_.divide(${dividend}, ${divisor});" ] }, "Creates a slice of `array` with `n` elements dropped from the beginning.": { "prefix": "drop", "body": [ "_.drop(${array}, ${n});" ] }, "Creates a slice of `array` with `n` elements dropped from the end.": { "prefix": "dropRight", "body": [ "_.dropRight(${array}, ${n});" ] }, "Creates a slice of `array` excluding elements dropped from the end.\nElements are dropped until `predicate` returns falsey. The predicate is\ninvoked with three arguments: (value, index, array).": { "prefix": "dropRightWhile", "body": [ "_.dropRightWhile(${array}, ${predicate});" ] }, "Creates a slice of `array` excluding elements dropped from the beginning.\nElements are dropped until `predicate` returns falsey. The predicate is\ninvoked with three arguments: (value, index, array).": { "prefix": "dropWhile", "body": [ "_.dropWhile(${array}, ${predicate});" ] }, "Checks if `string` ends with the given target string.": { "prefix": "endsWith", "body": [ "_.endsWith(${string}, ${target}, ${position});" ] }, "Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n\"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.": { "prefix": "escapeRegExp", "body": [ "_.escapeRegExp(${string});" ] }, "Fills elements of `array` with `value` from `start` up to, but not\nincluding, `end`.\n\n**Note:** This method mutates `array`.": { "prefix": "fill", "body": [ "_.fill(${array}, ${value}, ${start}, ${end});" ] }, "This method is like `_.find` except that it returns the index of the first\nelement `predicate` returns truthy for instead of the element itself.": { "prefix": "findIndex", "body": [ "_.findIndex(${array}, ${predicate});" ] }, "This method is like `_.find` except that it returns the key of the first\nelement `predicate` returns truthy for instead of the element itself.": { "prefix": "findKey", "body": [ "_.findKey(${object}, ${predicate});" ] }, "This method is like `_.find` except that it iterates over elements of\n`collection` from right to left.": { "prefix": "findLast", "body": [ "_.findLast(${collection}, ${predicate});" ] }, "This method is like `_.findIndex` except that it iterates over elements\nof `collection` from right to left.": { "prefix": "findLastIndex", "body": [ "_.findLastIndex(${array}, ${predicate});" ] }, "This method is like `_.findKey` except that it iterates over elements of\na collection in the opposite order.": { "prefix": "findLastKey", "body": [ "_.findLastKey(${object}, ${predicate});" ] }, "Creates a flattened array of values by running each element in `collection`\nthru `iteratee` and flattening the mapped results. The iteratee is invoked\nwith three arguments: (value, index|key, collection).": { "prefix": "flatMap", "body": [ "_.flatMap(${collection}, ${iteratee});" ] }, "This method is like `_.flatMap` except that it recursively flattens the\nmapped results.": { "prefix": "flatMapDeep", "body": [ "_.flatMapDeep(${collection}, ${iteratee});" ] }, "This method is like `_.flatMap` except that it recursively flattens the\nmapped results up to `depth` times.": { "prefix": "flatMapDepth", "body": [ "_.flatMapDepth(${collection}, ${iteratee}, ${depth});" ] }, "Recursively flatten `array` up to `depth` times.": { "prefix": "flattenDepth", "body": [ "_.flattenDepth(${array}, ${depth});" ] }, "Creates a function that invokes `func` with arguments reversed.": { "prefix": "flip", "body": [ "_.flip(${func});" ] }, "Computes `number` rounded down to `precision`.": { "prefix": "floor", "body": [ "_.floor(${number}, ${precision});" ] }, "Creates a function that returns the result of invoking the given functions\nwith the `this` binding of the created function, where each successive\ninvocation is supplied the return value of the previous.": { "prefix": "flow", "body": [ "_.flow(${funcs});" ] }, "This method is like `_.flow` except that it creates a function that\ninvokes the given functions from right to left.": { "prefix": "flowRight", "body": [ "_.flowRight(${funcs});" ] }, "This method is like `_.forEach` except that it iterates over elements of\n`collection` from right to left.": { "prefix": "eachRight", "body": [ "_.eachRight(${collection}, ${iteratee});" ] }, "Iterates over own and inherited enumerable string keyed properties of an\nobject and invokes `iteratee` for each property. The iteratee is invoked\nwith three arguments: (value, key, object). Iteratee functions may exit\niteration early by explicitly returning `false`.": { "prefix": "forIn", "body": [ "_.forIn(${object}, ${iteratee});" ] }, "This method is like `_.forIn` except that it iterates over properties of\n`object` in the opposite order.": { "prefix": "forInRight", "body": [ "_.forInRight(${object}, ${iteratee});" ] }, "Iterates over own enumerable string keyed properties of an object and\ninvokes `iteratee` for each property. The iteratee is invoked with three\narguments: (value, key, object). Iteratee functions may exit iteration\nearly by explicitly returning `false`.": { "prefix": "forOwn", "body": [ "_.forOwn(${object}, ${iteratee});" ] }, "This method is like `_.forOwn` except that it iterates over properties of\n`object` in the opposite order.": { "prefix": "forOwnRight", "body": [ "_.forOwnRight(${object}, ${iteratee});" ] }, "The inverse of `_.toPairs`; this method returns an object composed\nfrom key-value `pairs`.": { "prefix": "fromPairs", "body": [ "_.fromPairs(${pairs});" ] }, "Creates an array of function property names from own enumerable properties\nof `object`.": { "prefix": "functions", "body": [ "_.functions(${object});" ] }, "Creates an array of function property names from own and inherited\nenumerable properties of `object`.": { "prefix": "functionsIn", "body": [ "_.functionsIn(${object});" ] }, "Gets the value at `path` of `object`. If the resolved value is\n`undefined`, the `defaultValue` is used in its place.": { "prefix": "get", "body": [ "_.get(${object}, ${path}, ${defaultValue});" ] }, "Creates an object composed of keys generated from the results of running\neach element of `collection` thru `iteratee`. The order of grouped values\nis determined by the order they occur in `collection`. The corresponding\nvalue of each key is an array of elements responsible for generating the\nkey. The iteratee is invoked with one argument: (value).": { "prefix": "groupBy", "body": [ "_.groupBy(${collection}, ${iteratee});" ] }, "Checks if `value` is greater than `other`.": { "prefix": "gt", "body": [ "_.gt(${value}, ${other});" ] }, "Checks if `value` is greater than or equal to `other`.": { "prefix": "gte", "body": [ "_.gte(${value}, ${other});" ] }, "Checks if `path` is a direct or inherited property of `object`.": { "prefix": "hasIn", "body": [ "_.hasIn(${object}, ${path});" ] }, "Checks if `n` is between `start` and up to, but not including, `end`. If\n`end` is not specified, it's set to `start` with `start` then set to `0`.\nIf `start` is greater than `end` the params are swapped to support\nnegative ranges.": { "prefix": "inRange", "body": [ "_.inRange(${number}, ${start}, ${end});" ] }, "Checks if `value` is in `collection`. If `collection` is a string, it's\nchecked for a substring of `value`, otherwise\n[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\nis used for equality comparisons. If `fromIndex` is negative, it's used as\nthe offset from the end of `collection`.": { "prefix": "includes", "body": [ "_.includes(${collection}, ${value}, ${fromIndex});" ] }, "Gets all but the last element of `array`.": { "prefix": "initial", "body": [ "_.initial(${array});" ] }, "Creates an array of unique values that are included in all given arrays\nusing [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\nfor equality comparisons. The order of result values is determined by the\norder they occur in the first array.": { "prefix": "intersection", "body": [ "_.intersection(${arrays});" ] }, "This method is like `_.intersection` except that it accepts `iteratee`\nwhich is invoked for each element of each `arrays` to generate the criterion\nby which they're compared. Result values are chosen from the first array.\nThe iteratee is invoked with one argument: (value).": { "prefix": "intersectionBy", "body": [ "_.intersectionBy(${arrays}, ${iteratee});" ] }, "This method is like `_.intersection` except that it accepts `comparator`\nwhich is invoked to compare elements of `arrays`. Result values are chosen\nfrom the first array. The comparator is invoked with two arguments:\n(arrVal, othVal).": { "prefix": "intersectionWith", "body": [ "_.intersectionWith(${arrays}, ${comparator});" ] }, "Creates an object composed of the inverted keys and values of `object`.\nIf `object` contains duplicate values, subsequent values overwrite\nproperty assignments of previous values.": { "prefix": "invert", "body": [ "_.invert(${object});" ] }, "This method is like `_.invert` except that the inverted object is generated\nfrom the results of running each element of `object` thru `iteratee`. The\ncorresponding inverted value of each inverted key is an array of keys\nresponsible for generating the inverted value. The iteratee is invoked\nwith one argument: (value).": { "prefix": "invertBy", "body": [ "_.invertBy(${object}, ${iteratee});" ] }, "Invokes the method at `path` of `object`.": { "prefix": "invoke", "body": [ "_.invoke(${object}, ${path}, ${args});" ] }, "Invokes the method at `path` of each element in `collection`, returning\nan array of the results of each invoked method. Any additional arguments\nare provided to each invoked method. If `methodName` is a function, it's\ninvoked for and `this` bound to, each element in `collection`.": { "prefix": "invokeMap", "body": [ "_.invokeMap(${collection}, ${path}, ${args});" ] }, "Checks if `value` is classified as an `ArrayBuffer` object.": { "prefix": "isArrayBuffer", "body": [ "_.isArrayBuffer(${value});" ] }, "Checks if `value` is a buffer.": { "prefix": "isBuffer", "body": [ "_.isBuffer(${value});" ] }, "Checks if `value` is likely a DOM element.": { "prefix": "isElement", "body": [ "_.isElement(${value});" ] }, "This method is like `_.isEqual` except that it accepts `customizer` which\nis invoked to compare values. If `customizer` returns `undefined`, comparisons\nare handled by the method instead. The `customizer` is invoked with up to\nsix arguments: (objValue, othValue [, index|key, object, other, stack]).": { "prefix": "isEqualWith", "body": [ "_.isEqualWith(${value}, ${other}, ${customizer});" ] }, "Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n`SyntaxError`, `TypeError`, or `URIError` object.": { "prefix": "isError", "body": [ "_.isError(${value});" ] }, "Checks if `value` is an integer.\n\n**Note:** This method is based on\n[`Number.isInteger`](https://mdn.io/Number/isInteger).": { "prefix": "isInteger", "body": [ "_.isInteger(${value});" ] }, "Checks if `value` is classified as a `Map` object.": { "prefix": "isMap", "body": [ "_.isMap(${value});" ] }, "Performs a partial deep comparison between `object` and `source` to\ndetermine if `object` contains equivalent property values. This method is\nequivalent to a `_.matches` function when `source` is partially applied.\n\n**Note:** This method supports comparing the same values as `_.isEqual`.": { "prefix": "isMatch", "body": [ "_.isMatch(${object}, ${source});" ] }, "This method is like `_.isMatch` except that it accepts `customizer` which\nis invoked to compare values. If `customizer` returns `undefined`, comparisons\nare handled by the method instead. The `customizer` is invoked with five\narguments: (objValue, srcValue, index|key, object, source).": { "prefix": "isMatchWith", "body": [ "_.isMatchWith(${object}, ${source}, ${customizer});" ] }, "Checks if `value` is a native function.": { "prefix": "isNative", "body": [ "_.isNative(${value});" ] }, "Checks if `value` is `null` or `undefined`.": { "prefix": "isNil", "body": [ "_.isNil(${value});" ] }, "Checks if `value` is a plain object, that is, an object created by the\n`Object` constructor or one with a `[[Prototype]]` of `null`.": { "prefix": "isPlainObject", "body": [ "_.isPlainObject(${value});" ] }, "Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\ndouble precision number which isn't the result of a rounded unsafe integer.\n\n**Note:** This method is based on\n[`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).": { "prefix": "isSafeInteger", "body": [ "_.isSafeInteger(${value});" ] }, "Checks if `value` is classified as a `Set` object.": { "prefix": "isSet", "body": [ "_.isSet(${value});" ] }, "Checks if `value` is classified as a `Symbol` primitive or object.": { "prefix": "isSymbol", "body": [ "_.isSymbol(${value});" ] }, "Checks if `value` is classified as a typed array.": { "prefix": "isTypedArray", "body": [ "_.isTypedArray(${value});" ] }, "Checks if `value` is classified as a `WeakMap` object.": { "prefix": "isWeakMap", "body": [ "_.isWeakMap(${value});" ] }, "Checks if `value` is classified as a `WeakSet` object.": { "prefix": "isWeakSet", "body": [ "_.isWeakSet(${value});" ] }, "Converts all elements in `array` into a string separated by `separator`.": { "prefix": "join", "body": [ "_.join(${array}, ${separator});" ] }, "Converts `string` to\n[kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).": { "prefix": "kebabCase", "body": [ "_.kebabCase(${string});" ] }, "Creates an object composed of keys generated from the results of running\neach element of `collection` thru `iteratee`. The corresponding value of\neach key is the last element responsible for generating the key. The\niteratee is invoked with one argument: (value).": { "prefix": "keyBy", "body": [ "_.keyBy(${collection}, ${iteratee});" ] }, "This method is like `_.indexOf` except that it iterates over elements of\n`array` from right to left.": { "prefix": "lastIndexOf", "body": [ "_.lastIndexOf(${array}, ${value}, ${fromIndex});" ] }, "Create a new pristine `lodash` function using the `context` object.": { "prefix": "runInContext", "body": [ "_.runInContext(${context});" ] }, "Gets the element at `n` index of `array`. If `n` is negative, the nth\nelement from the end is returned.": { "prefix": "nth", "body": [ "_.nth(${array}, ${n});" ] }, "Removes