lodash: added _.keyIn() method

This commit is contained in:
Ilya Mochalov
2015-07-18 07:47:13 +05:00
parent c0fdc8f774
commit 728600a0f4
2 changed files with 20 additions and 0 deletions
+3
View File
@@ -1018,6 +1018,9 @@ result = <boolean>_.isUndefined(void 0);
result = <string[]>_.keys({ 'one': 1, 'two': 2, 'three': 3 });
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keys().value();
result = <string[]>_.keysIn({ 'one': 1, 'two': 2, 'three': 3 });
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keysIn().value();
var mergeNames = {
'stooges': [
{ 'name': 'moe' },
+17
View File
@@ -6003,6 +6003,23 @@ declare module _ {
keys(): LoDashArrayWrapper<string>
}
//_.keysIn
interface LoDashStatic {
/**
* Creates an array of the own and inherited enumerable property names of object.
* @param object The object to query.
* @return An array of property names.
**/
keysIn(object?: any): string[];
}
interface LoDashObjectWrapper<T> {
/**
* @see _.keysIn
**/
keysIn(): LoDashArrayWrapper<string>
}
//_.mapValues
interface LoDashStatic {
/**