vueuse / vue-chemistry

Reactified JavaScript functions for Vue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Array & Objects

antfu opened this issue · comments

Support something like

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

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]