patronum
patronum copied to clipboard
Add string type to shape in `reshape`
const $data = createStore({ foo: 1, bar: 2 })
const { wow, demo } = reshape({
source: $data,
shape: {
wow: "foo",
demo: (obj) => obj.bar,
},
})
Shorthands:
const $data = createStore({ foo: 1, bar: 2 })
const { foo, bar } = reshape({
source: $data,
shape: ["foo", "bar"],
})