prop-transform
1.0.3 • Public • Published prop-transform
Wrapper function for dot-prop
, suitable for usage as an array mapper.
Example
var transform = require('prop-transform')
var data = [{
nested: {
prop: 'stuff'
}
}, {
nested: {
prop: 'other'
}
}]
var output = data.map(transform('nested.prop', value => value.toUpperCase()))
console.log(output[0].nested.prop)
console.log(output[1].nested.prop)
License
Apache-2.0
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.3 | 3 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.3 | 3 | |
1.0.2 | 0 | |
1.0.1 | 0 | |
1.0.0 | 0 | |
Package Sidebar
Install
Weekly Downloads