Skip to content

feat(array): isDeepEqual and uniqueBy - #24

Merged
antfu merged 6 commits into
antfu:mainfrom
akinoccc:main
Nov 29, 2022
Merged

feat(array): isDeepEqual and uniqueBy#24
antfu merged 6 commits into
antfu:mainfrom
akinoccc:main

Conversation

@akinoccc

Copy link
Copy Markdown
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
Copy Markdown
Owner

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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.

@antfuantfu changed the title feat(array): add unique muti-type array method.feat(array): isDeepEqual and uniqueByNov 29, 2022
@antfu
antfu merged commit 1119821 into antfu:mainNov 29, 2022
Sign up for freeto 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

@akinoccc@antfu