Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-copy

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-copy

A blazing fast deep object copier

  • 3.0.0-beta.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9M
decreased by-3.11%
Maintainers
1
Weekly downloads
 
Created

What is fast-copy?

The fast-copy npm package is a deep copying utility designed to be faster than other deep copy alternatives. It can handle various JavaScript data types and structures, including objects, arrays, dates, and more, providing a deep clone without the performance overhead of other libraries.

What are fast-copy's main functionalities?

Deep copying objects

This feature allows you to create a deep copy of an object, ensuring that nested objects are also cloned rather than just their references.

const copy = require('fast-copy').default;
const original = { a: 1, b: { c: 2 } };
const cloned = copy(original);

Deep copying arrays

Similar to objects, this feature enables deep copying of arrays, including nested arrays.

const copy = require('fast-copy').default;
const original = [1, 2, [3, 4]];
const cloned = copy(original);

Copying other types

fast-copy can also clone other JavaScript types such as Date objects and regular expressions.

const copy = require('fast-copy').default;
const date = new Date();
const regex = new RegExp('ab+c', 'i');
const clonedDate = copy(date);
const clonedRegex = copy(regex);

Other packages similar to fast-copy

Keywords

FAQs

Package last updated on 26 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc