Skip to content

githubUser982/better-structured-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

better-structured-clone

A node module to deep-clone objects (or anything) that works better. Common packages like structuredClone or the deep-clone functionality in lowdash has massive drawbacks by not supporting symbols and functions. This package solves this.

Installation

npm install better-structured-clone

Usage

const clone = require('better-structured-clone');

const object = {
	symbol: Symbol('symbol'),
	function: () => console.log('function'),
	string: 'string',
	number: 1,
}

const clonedObject = clone(object);

About

A node module to deep-clone objects (or anything) that works better.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published