1.3.1 • Published 10 days ago

@vill-v/path-prop v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

@vill-v/path-prop

neta了崩坏3 往世乐土的英杰维尔薇

npm (scoped)

一个基于路径字符串对对象进行操作的工具

只是个人项目,整体较为随便,作为开发途中的经验总结,如有相似的需求,推荐copy或阅读源码,不建议将该包在实际项目中使用

如有幸被实际使用在项目内,不胜荣幸

const obj = {test: [{test1: 'test2'}]}

getByPath(obj, 'test[0].test1')
// -> test2

const obj1 = {test: [{test1: 'test2'}]}

setByPath(obj1, 'test[0].test1', 'test3')
// obj -> {test: [{test1: 'test3'}]}

const obj2 = {test: [{test1: 'test2'}]}

delByPath(obj2, 'test[0]')

// obj -> {test: []}

const obj3 = {test: [{test1: 'test2'}]}

hasByPath(obj3, 'test[0].test1')
// -> true
1.3.1

10 days ago

1.2.5

10 months ago

1.2.4

10 months ago

1.2.3

10 months ago

1.3.0

9 months ago

1.2.2

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

2 years ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.0

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago