@x-oasis/unique-array-object
v0.1.35
Published
unique-array-object function
Downloads
26
Readme
@x-oasis/unique-array-object
keep the last on default
Installation
$ npm i @x-oasis/unique-array-object
How to use
import uniqueArrayObject from '@x-oasis/unique-array-object'
const state = [
{ name: 'viewable', value: 7 },
{ name: 'imageViewable', value: 9 },
{ name: 'viewable', value: 8 }
]
uniqueArrayObject(state, 'name')
// output
// [
// { name: 'imageViewable', value: 9 },
// { name: 'viewable', value: 8 },
// ]
How to run test
$ pnpm test