1.0.0 • Published 2 years ago

copy-kopya v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

PropertySample
ARRAY of data[1, 2, 3]
ARRAY of object[{ name: "John" }, { name: "Peter" }]
FUNCTIONconst test = () => "Hello world";
MAPconst map = new Map(); map.set("a", 1);
SETconst 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.