# lodash-flatkeystree

> Recusively get the keys for an object.

Latest version **1.0.0** (published 2017-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install lodash-flatkeystree
pnpm add lodash-flatkeystree
yarn add lodash-flatkeystree
bun add lodash-flatkeystree
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-10-27 |
| First published | 2017-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Josh Erickson |
| Maintainers | snoj |

## Links

- npm: https://www.npmjs.com/package/lodash-flatkeystree
- Repository: https://github.com/snoj/lodash-flatkeystree
- Homepage: https://github.com/snoj/lodash-flatkeystree#readme
- Issues: https://github.com/snoj/lodash-flatkeystree/issues
- npm.io page: https://npm.io/package/lodash-flatkeystree

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4

## Recent versions

- 1.0.0 (latest) — 2017-10-27

## README

# Install
npm install lodash-flatkeystree

# Purpose

Need a way to get all the key paths in an object? Look no further.

Also ignores circular references in an object.

# _.keysDeep(object, [depth = 1])

#### Arguments

* object: The object to get keys from
* depth: The number of circular objects to traverse/include. (default 1)

# Use

```js
var _ = require('lodash'), keysDeep = require('lodash-flatkeystree');

_.mixin(keysDeep);

var obj = {
  a: {tree: ['that', 'goes', {deep: '!'}]},
  b: [1,2,3,5,8,13, {another: {key: [13,8,5,3,2,1]}}]
};

_.keysDeep(obj);

[ 'a.tree.0',
  'a.tree.1',
  'a.tree.2.deep',
  'b.0',
  'b.1',
  'b.2',
  'b.3',
  'b.4',
  'b.5',
  'b.6.another.key.0',
  'b.6.another.key.1',
  'b.6.another.key.2',
  'b.6.another.key.3',
  'b.6.another.key.4',
  'b.6.another.key.5' ];

```

#### Circular with depth > 1
```js
var circularObj = {
  a: {tree: ['that', 'goes', {deep: '!'}]},
  b: [1,2,3,5,8,13, {another: {key: [13,8,5,3,2,1]}}]
};

circularObj.c = {
  cir: circularObj.a,
  something: 'else'
};

_.keysDeep(circularObj, 2);

[ 'a.tree.0',
  'a.tree.1',
  'a.tree.2.deep',
  'b.0',
  'b.1',
  'b.2',
  'b.3',
  'b.4',
  'b.5',
  'b.6.another.key.0',
  'b.6.another.key.1',
  'b.6.another.key.2',
  'b.6.another.key.3',
  'b.6.another.key.4',
  'b.6.another.key.5',
  'c.cir.tree.0',
  'c.cir.tree.1',
  'c.cir.tree.2.deep',
  'c.something' ]

```

---
_Source: https://npm.io/package/lodash-flatkeystree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
