Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
citrizon committed Dec 21, 2024
1 parent 71940a5 commit 2c3a1e5
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,6 @@ function deepModify ( source, target ) {
return target;
}

// This is an old clone implementation which is
// pretty slow. It will be replaced by a JSON parsing
// which is essentially faster than this implementation
// below.
//
// function clone ( object ) {
// if ( !object )
// return object;
// if ( Array.isArray( object ) )
// return [ ...object ].map( e => clone( e ) );
// if ( typeof object !== "object" )
// return object;
// return Object.fromEntries(
// Object.entries( object ).map(
// ( [ key, value ] ) => [ key, clone( value ) ]
// )
// );
// }
//
// Node.js... What is wrong with you :sob:

function clone(obj) {
var ret = {}, key, val;
for ( key in obj ) {
Expand Down

0 comments on commit 2c3a1e5

Please sign in to comment.