Skip to content

Commit

Permalink
feat: export function merge & merge.all from package "deepmerge"
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatAuk committed Aug 25, 2023
1 parent 2173074 commit 8173890
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"deepmerge"
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ pnpm add @utopia-utils/dom
* getFileName: 获取文件名。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/core/src/getFileName.ts)
* [Cookies](https://github.com/js-cookie/js-cookie#basic-usage): cookie utils.(export from [js-cookie](https://github.com/js-cookie/js-cookie)
* [mitt](https://github.com/developit/mitt): event emitter / pubsub, typesafe.(export from [mitt](https://github.com/developit/mitt)
* [merge](https://github.com/TehShrike/deepmerge): Merge two objects x and y deeply, returning a new merged object with the elements from both x and y.(export from [deepmerge](https://github.com/TehShrike/deepmerge)
* [merge.all](https://github.com/TehShrike/deepmerge): Merges any number of objects into a single result object.(export from [deepmerge](https://github.com/TehShrike/deepmerge)
* unique: 数组去重。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/core/src/unique.ts)
* union: 数组并集。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/core/src/union.ts)
* uniqueWith: 数组去重,使用自定义的比较函数。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/core/src/uniqueWith.ts)
Expand Down
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"dependencies": {
"@utopia-utils/dom": "workspace:*",
"@utopia-utils/share": "workspace:*",
"@utopia-utils/tree": "workspace:*"
"@utopia-utils/tree": "workspace:*",
"deepmerge": "^4.3.1"
},
"devDependencies": {
"@types/js-cookie": "^3.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/vendor.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { debounce, throttle } from 'throttle-debounce'
export { default as mitt } from 'mitt'
export { default as Cookies } from 'js-cookie'
export { default as merge } from 'deepmerge'
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8173890

Please sign in to comment.