Current collected state Current
Observed since 20 Oct, 20:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
转换一个对象的value值
转换一个对象的value值,源对象不变
$ npm install 4obj-value
const objValue = require('4obj-value');
objValue({a: 1}, {a: String}) // 对象方式映射
//=> {a: '1'}
objValue({a: 1, b: 1}, {'a b': String}) // 多个key,通过空格分割
//=> {a: '1', b: '1'}
objValue({a: 1}, { a: function myFn(value) { return value + 1 } }) // 自定义函数方式
//=> {a: 2}
objValue({a: 1, b: 1}, {'a, b': String}) // 多个key,通过(逗号+空格)分割
//=> {a: '1', b: '1'}
objValue({a: 1, b: 1}, {'a , b': String}) // 多个key,通过(逗号+空格)分割
//=> {a: '1', b: '1'}
objValue({a: 1, b: 1}, {'a ,, , b': String}) // 多个key,通过(逗号+空格)分割
//=> {a: '1', b: '1'}
Type: Object
Type: Object
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 13 May 2019 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:747bea769127a381442431bd5dbce1aee61ba2c518f4551e3f7cfbec495ebd4b