Merge pull request #7709 from SuperPaintman/master

Added lodash `_.unset`
This commit is contained in:
Masahiro Wakame
2016-01-25 12:20:15 +09:00
+16 -1
View File
@@ -256,7 +256,7 @@ declare module _ {
* keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min,
* object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject,
* remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times,
* toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip
* toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip
*
* The non-chainable wrapper functions are:
* clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast,
@@ -4236,6 +4236,21 @@ declare module _ {
): any[];
}
//_.unset
interface LoDashStatic {
/**
* Removes the property at path of object.
*
* @param object The object to modify.
* @param path The path of the property to unset.
* @return Returns true if the property is deleted, else false.
*/
unset<T>(
object: T,
path: StringRepresentable | StringRepresentable[]
): boolean;
}
//_.unzip
interface LoDashStatic {
/**