# spread-paths

> ![]( https://img.alicdn.com/imgextra/i1/583325539/O1CN01jnhKkB1qmuPZ4B6pG_!!583325539.jpg)

Latest version **1.0.0** (published 2020-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install spread-paths
pnpm add spread-paths
yarn add spread-paths
bun add spread-paths
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-05-29 |
| First published | 2020-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 32.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tangoboy |
| Maintainers | tangoboy |

## Links

- npm: https://www.npmjs.com/package/spread-paths
- npm.io page: https://npm.io/package/spread-paths

## Recent versions

- 1.0.0 (latest) — 2020-05-29

## README

# spread-paths.js #


![](
https://img.alicdn.com/imgextra/i1/583325539/O1CN01jnhKkB1qmuPZ4B6pG_!!583325539.jpg)


字符串转换，将有使用`[]`符号合并的path路径展开

## 安装 ##
`npm i -s spread-paths`



## 使用 ##

```javascript
const spreadPaths = require("spread-paths");


spreadPaths("a.b, c.d.e"); //"a.b,c.d.e"

spreadPaths("a.b[c,e]"); //"a.b.c,a.b.e"

spreadPaths("a.b[c,e[f,g]]"); //"a.b.c,a.b.e.f,a.b.e.g"

```

## 注意 ##
```javascript

spreadPaths({});//报错：必须是字符串
spreadPaths("a[b]]");//报错：方括号未闭合
spreadPaths("a[b,c]e");//报错：不支持分支后再合并写法


```

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