o
Version:
common object helper functions
21 lines (20 loc) • 504 B
TypeScript
import { KeysOptions, OObject } from './types';
/**
* Get the keys of the specified object (different to Object.keys
* because Object.keys can't follow deep objects)
*
* @example
* ```
* const a = { a: 1, b: { c: 2, d: { e: 3 } } };
*
* keys(a); // => [ 'a', 'b' ]
* keys(a, true); // => [ 'a', 'b.c', 'b.d.e' ]
* ```
*
* @throws TypeError
*
* @since 1.0.0
* @version 2.0.0
*/
declare function keys(obj: OObject, options?: KeysOptions): string[];
export default keys;