# string2tree

> convert string array to tree

Latest version **1.0.0** (published 2016-04-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install string2tree
pnpm add string2tree
yarn add string2tree
bun add string2tree
```

## 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 | 2016-04-25 |
| First published | 2016-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | linuo |
| Maintainers | linuo |
| Keywords | string, array, tree |

## Links

- npm: https://www.npmjs.com/package/string2tree
- Repository: https://github.com/stevennuo/string2tree
- Homepage: https://github.com/stevennuo/string2tree#readme
- Issues: https://github.com/stevennuo/string2tree/issues
- npm.io page: https://npm.io/package/string2tree

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-04-25

## README

# string2tree

convert string array to tree

[![Build Status](https://travis-ci.org/stevennuo/string2tree.svg?branch=master)](https://travis-ci.org/stevennuo/string2tree)

## Example
``` javascript
string2tree({
    "a.b.c.d":val,
    "a.b": obj,
    "a.b.e": func,
    "f.g": array
  }
);

output:{
  "a":{
    "b":{
      "c":{
        "d":{
          "_v": val
        }
      },
      "_v": obj,
      "e":{
        "_v": func
      }
    }
  },
  "f":{
    "g":{
      "_v": array
    }
  }
}
```

## To begin
* install
``` bash
$ npm install string2tree --save
```
* require & use
``` javascript
const string2tree = require('string2tree')

string2tree({
    "a.b.c.d":val,
    "a.b": obj,
    "a.b.e": func,
    "f.g": array
  }
);
```

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