get mungr
const mungr = require('mungr')
make a mungr
productMungr = mungr({
name: String,
price: Number
})
use it
const products = [{name: 'dog', price: '22'}, {name: 'lollipop', price: '5'}]
return products.map(productMungr) // [{name: 'dog', price: 22}, {name: 'lollipop', price: 5}]
whatever