An Object that allows to perform a function over a source property's value
example
const source = {
foo: {
bar: 'bar'
}
};
let schema = {
barqux: {
path: 'foo.bar',
fn: value =>`${value}qux`// Apply a function over the source property's value
}
};
morphism(schema, source);
//=> { barqux: 'barqux' }
ActionSelector
Result Type
An Object that allows to perform a function over a source property's value
const source = { foo: { bar: 'bar' } }; let schema = { barqux: { path: 'foo.bar', fn: value => `${value}qux` // Apply a function over the source property's value } }; morphism(schema, source); //=> { barqux: 'barqux' }