Skip to content

Commit 8b771d7

Browse files
committed
v2.0.2
1 parent 1110609 commit 8b771d7

File tree

5 files changed

+1354
-1351
lines changed

5 files changed

+1354
-1351
lines changed

CHAGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG
22

3+
## v2.0.2
4+
- In `del` method if index is a negative number, return a copy of the original array. By just returning the original array (as of version 1.0.3) is dangerous for mutating the resulted array if the original is mutated.
5+
36
## v2.0.1
47

58
- Update `devDependencies`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Deletes an element from an array by its index in the array.
262262
| Param | Type | Description |
263263
| --- | --- | --- |
264264
| array | <code>Array</code> | The original array. |
265-
| index | <code>Number</code> | The index of the element to delete in the original array. If index is a negative number, the original array is returned. |
265+
| index | <code>Number</code> | The index of the element to delete in the original array. If index is a negative number, a copy of the original array is returned. |
266266

267267
**Example**
268268
```js

0 commit comments

Comments
 (0)