Skip to content

Commit

Permalink
release v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
litt1e-p committed Feb 23, 2023
1 parent 01fb7b1 commit 69cc2b0
Show file tree
Hide file tree
Showing 6 changed files with 451 additions and 426 deletions.
2 changes: 1 addition & 1 deletion dist/jstd.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jstd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jstd.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jstd",
"version": "0.3.1",
"version": "0.3.2",
"description": "js utilities lib",
"config": {
"libName": "jstd"
Expand Down
4 changes: 2 additions & 2 deletions packages/function/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ export const copy = function (obj: any, deep = true): any {
if (TypedCopyMap[typeis(target) as string]) {
return TypedCopyMap[typeis(target) as string](obj)
}
if (arrayable(obj)) {
if (arrayable(obj, false)) {
const cy: Array<any> = Array.prototype.constructor()
obj.map((i: any) => cy.push(i))
return deep ? cy.map((i: any) => copy(i)) : cy
}
if (objectable(obj)) {
if (objectable(obj, false)) {
const cy = { ...(obj as { [key: string]: any }) } as {
[key: string]: any
}
Expand Down
Loading

0 comments on commit 69cc2b0

Please sign in to comment.