# n-tools

> a util tool for dev

Latest version **0.1.3** (published 2019-08-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install n-tools
pnpm add n-tools
yarn add n-tools
bun add n-tools
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-08-22 |
| First published | 2017-10-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 30.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | ReAlign |
| Maintainers | realign |

## Links

- npm: https://www.npmjs.com/package/n-tools
- Repository: https://github.com/ReAlign/n-tools
- Homepage: https://github.com/ReAlign/n-tools#readme
- Issues: https://github.com/ReAlign/n-tools/issues
- npm.io page: https://npm.io/package/n-tools

## Recent versions

- 0.1.3 (latest) — 2019-08-22
- 0.1.2 — 2017-12-14
- 0.1.1 — 2017-12-13
- 0.1.0 — 2017-12-12
- 0.0.9 — 2017-12-11
- 0.0.8 — 2017-11-02
- 0.0.7 — 2017-11-02
- 0.0.6 — 2017-11-02
- 0.0.5 — 2017-11-02
- 0.0.4 — 2017-11-02
- 0.0.3 — 2017-10-19
- 0.0.2 — 2017-10-16
- 0.0.1 — 2017-10-16

## README

# n-tools
开发工具函数

## methods
| name | note | other |
| --- | --- | --- |
| typeof |  |  |
| compareObject | 复杂类型数据比较 |  |
| deepClone | 深拷贝 |  |
| extend |  |  |
| merge |  |  |
| arrayEquals | 数组比较 |  |
| keepDecimal |  |  |
| formatDigital |  |  |
| deepGet | 深获取 |  |

## Usage

```
    let _ = require( 'n-tools' );

    _.compareObject(x, y);
```

### deepGet

```
var obj = {
    a: [
        {
            b: {
                c: 3
            }
        }
    ],
    e: {
        f: [
            {
                g: 'alj'
            },
            {
                g: 'kakaka'
            }
        ]
    }
};

var result = '';

for(var kk = 0; kk < 3; kk++) {
	result = _.deepGet(obj, 'e.f[' + kk +'].g', '');
	console.log(result);
}

// 'alj'
// 'kakaka'
// ''
```

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