Skip to content

Commit 72161f3

Browse files
committed
Release v1.0.0
2 parents 3932001 + 2f51434 commit 72161f3

File tree

13 files changed

+1840
-1
lines changed

13 files changed

+1840
-1
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@
55
All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8+
9+
## [1.0.0] - 2019-12-12 ##
10+
11+
[1.0.0]: https://github.com/mfederczuk/deeptools/releases/tag/v1.0.0
12+
13+
### Added ###
14+
15+
* `deepCopy`, `deepEquals`, `deepFreeze` and `safeCopy` functions
16+
* **TypeScript** typings for all functions

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DeepTools #
22

3-
[version_shield]: https://img.shields.io/badge/version-N%2FA-blue.svg
3+
[version_shield]: https://img.shields.io/badge/version-1.0.0-blue.svg
44
[latest_release]: https://github.com/mfederczuk/deep-tools/releases/latest "Latest Release"
55
[![version: N/A][version_shield]][latest_release]
66
[![Changelog](https://img.shields.io/badge/-Changelog-blue)](./CHANGELOG.md "Changelog")
@@ -9,6 +9,56 @@
99

1010
**DeepTools** is a set of utility functions that recursively operate on objects.
1111

12+
## Download ##
13+
14+
Using **npm**:
15+
16+
```sh
17+
npm i @mfederczuk/deeptools
18+
```
19+
20+
Using **Yarn**:
21+
22+
```sh
23+
yarn add @mfederczuk/deeptools
24+
```
25+
26+
## Usage ##
27+
28+
### [`deepCopy`](./src/deepCopy.js) ###
29+
30+
```ts
31+
function deepCopy<T>(obj: T): T;
32+
```
33+
34+
Creates a deep copy of **obj**.
35+
36+
### [`deepEquals`](./src/deepEquals.js) ###
37+
38+
```ts
39+
function deepEquals(obj1: any, obj2: any): boolean;
40+
```
41+
42+
Checks if **obj1** and **obj2** are equal by recursing through their properties.
43+
44+
### [`deepFreeze`](./src/deepFreeze.js) ###
45+
46+
```ts
47+
function deepFreeze<T>(arr: T[]): ReadonlyArray<T>;
48+
function deepFreeze<T extends Function>(fun: T): T;
49+
function deepFreeze<T>(obj: T): Readonly<T>;
50+
```
51+
52+
Recursively freezes **obj** with all of its properties.
53+
54+
### [`safeCopy`](./src/safeCopy.js) ###
55+
56+
```ts
57+
function safeCopy<T>(obj: T): T;
58+
```
59+
60+
Creates a safe copy of **obj** by creating a deep frozen copy of it.
61+
1262
## Contributing ##
1363

1464
Read through the [DeepTools Contribution Guidelines](./CONTRIBUTING.md)

0 commit comments

Comments
 (0)