Skip to content

Conversation

@akinoccc
Copy link
Contributor

Description

add the method unique muti-type array.

example: [{ a: 1 }, { a: 1 }, 1, 2, 1, [1, 2], [1, 2]] => [{ a: 1 }, 1, 2, [1, 2]]

@antfu
Copy link
Owner

antfu commented Nov 16, 2022

I think we could extract the isEqual to a standalone utility isDeepEqual, and another uniqueBy(array, equalFn) to be able to compose to your goal

@akinoccc
Copy link
Contributor Author

I think we could extract the isEqual to a standalone utility isDeepEqual, and another uniqueBy(array, equalFn) to be able to compose to your goal

haha, I think so. I'll revise it later

@akinoccc
Copy link
Contributor Author

I think we could extract the isEqual to a standalone utility isDeepEqual, and another uniqueBy(array, equalFn) to be able to compose to your goal

I done it.

@antfu antfu changed the title feat(array): add unique muti-type array method. feat(array): isDeepEqual and uniqueBy Nov 29, 2022
@antfu antfu merged commit 1119821 into antfu:main Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants