2.1.0-indev01 • Published 11 months ago

@mfederczuk/deeptools v2.1.0-indev01

Weekly downloads
5
License
GPL-3.0-or-later
Repository
github
Last release
11 months ago

DeepTools

version: 2.1.0-indev01 Changelog

About

DeepTools is a set of JavaScript utility functions that recursively operate on objects.

Usage

deepCopy

function deepCopy<T>(obj: T): T;

Creates a deep copy of obj.

deepEquals

function deepEquals(obj1: unknown, obj2: unknown): boolean;

Checks if obj1 and obj2 are equal by recursing through their properties.

deepFreeze

function deepFreeze<T>(arr: T[][]): readonly (readonly Readonly<T>[])[];

Recursively freezes arr, all of arr's items and all items of arr's items.

function deepFreeze<T>(arr: T[]): readonly Readonly<T>[];

Recursively freezes arr and all of its items.

function deepFreeze<T>(obj: T): Readonly<T>;

Recursively freezes obj and all of its properties.

safeCopy

function safeCopy<T>(arr: T[][]): readonly (readonly Readonly<T>[])[];
function safeCopy<T>(arr: T[]): readonly Readonly<T>[];

Creates a safe copy of arr by creating a deep frozen copy of it.

function safeCopy<T>(obj: T): Readonly<T>;

Creates a safe copy of obj by creating a deep frozen copy of it.

Installation

Using npm:

npm i @mfederczuk/deeptools

Using yarn:

yarn add @mfederczuk/deeptools

Contributing

Read through the Contribution Guidelines if you want to contribute to this project.

License

DeepTools is licensed under the GNU General Public License v3.0 or later.
For more information about copying and licensing, see the COPYING.txt file.

2.1.0-indev01

11 months ago

2.0.0-rc01

1 year ago

2.0.0-indev02

1 year ago

1.1.1

1 year ago

2.0.0-indev01

1 year ago

1.1.0

2 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago