0.1.3 • Published 6 years ago

n-tools v0.1.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

n-tools

开发工具函数

methods

namenoteother
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'
// ''
0.1.3

6 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago