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

@ungap/structured-clone

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ungap/structured-clone

A structuredClone polyfill

  • 0.3.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21M
decreased by-3.44%
Maintainers
1
Weekly downloads
 
Created

What is @ungap/structured-clone?

The @ungap/structured-clone package provides a polyfill for the structuredClone function, which allows for deep cloning of objects, including complex types that are not handled by JSON serialization, such as Dates, Maps, Sets, etc. This functionality is particularly useful for copying values where a simple reference copy is not sufficient or desired.

What are @ungap/structured-clone's main functionalities?

Cloning complex objects

This feature allows for the deep cloning of complex objects, including those containing types that cannot be cloned using JSON methods. It's useful for duplicating objects that include nested structures, Dates, Maps, Sets, etc., without the original object being affected by changes to the clone.

const clonedObject = structuredClone(originalObject);

Other packages similar to @ungap/structured-clone

Keywords

FAQs

Package last updated on 07 Nov 2021

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