Skip to content

Commit

Permalink
Std: faster copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Mar 25, 2024
1 parent c6a4077 commit 4bf0736
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/std/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
* @returns {T}
*/
export function copy(a) {
const copy = {}
Object.assign(copy, a)
return copy
return { ...a }
}

0 comments on commit 4bf0736

Please sign in to comment.