‘fast-copy’ is a deep object copier that is useful for creating copies of simple, complex, circular, and special objects starting from small number and ending with custom constructors, React components and etc. As we love to explore new tools, today we’ll share ‘fast-copy’ with you.
Under the hood,
instanceof to determine object types, which can cause false negatives when used in combination with
iframe-based objects. To handle this edge case, you can pass the optional second parameter of
copy method, which identifies which realm the object comes from and will use that realm to drive both comparisons and constructors for the copies.
Circular objects are supported out of the box
Find other supported object types on Github.