vue-chemistry icon indicating copy to clipboard operation
vue-chemistry copied to clipboard

Support for Array & Objects

Open antfu opened this issue 3 years ago • 1 comments

Support something like

import { map, filter, reduce } from 'vue-chemistry/array'
import { keys, entries, fromEntries } from 'vue-chemistry/object'

antfu avatar Jan 08 '21 10:01 antfu

what you think about

import { chainReaction } from 'vue-chemistry'

const filterValue = ref(6);
const arr = chainReaction([1, 2, 3]).map((it) => it * 3).filter((it) => it > filterValue.value)

console.log(arr) // [9]

filterValue.value = 0
console.log(arr) // [3, 6, 9]

mdbetancourt avatar Mar 30 '22 03:03 mdbetancourt