Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

copy-kopya

deanilvincent16MIT1.0.0

Create an immutable clone or copy of data. This could be an array, object, map, set or function.

immutable, clone, copy, array, copy, object, clone, map, clone, set, copy immutable, clone immutable, copy object, copy array, copy map, copy set, copy function, clone object, clone array, clone map, clone set, clone function, copy-immutable, clone-immutable, copy-object, copy-array, copy-map, copy-set, copy-function, clone-object, clone-array, clone-map, clone-set, clone-function

readme

Build Status

Overview

Create an immutable clone or copy of data. This could be an array, object, map, set or function.

Installation

npm i copy-kopya --save

Setup & Basic Usage

const { copy } = require('copy-kopya')
// OR
import { copy } from 'copy-kopya'

const data = [1, 2, 3];

const result = copy(data)

// [1,2,3]

Additional Info

Options

Property Sample
ARRAY of data [1, 2, 3]
ARRAY of object [{ name: "John" }, { name: "Peter" }]
FUNCTION const test = () => "Hello world";
MAP const map = new Map(); map.set("a", 1);
SET const set = new Set(); set.add(1);

Credits to: Chris Ferdinandi.

Official documentation from https://gomakethings.com/

Contribute

Feel free to clone or fork this project: https://github.com/deanilvincent/copy-kopya.git

Contributions & pull requests are welcome!

I'll be glad if you give this project a ★ on Github :))

License

This project is licensed under the MIT License - see the LICENSE.md file for details.