Comparing version 1.0.62 to 1.0.63
{ | ||
"name": "helprjs", | ||
"version": "1.0.62", | ||
"version": "1.0.63", | ||
"description": "Helprjs is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -45,2 +45,15 @@ # helprjs | ||
#### mergeArraysRemoveDuplicates - [Demo](https://codesandbox.io/p/sandbox/mergearraysremoveduplicates-zfv52x?file=%2Fsrc%2FApp.js) | ||
``` | ||
merges two arrays and removes all duplicates | ||
Useage: | ||
const array1 = [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }]; | ||
const array2 = [{ id: 2, name: 'Bob' }, { id: 3, name: 'Charlie' }]; | ||
const mergedArray = mergeArraysRemoveDuplicates(array1, array2); | ||
console.log(mergedArray); | ||
``` | ||
#### deGroup - [Demo](https://codesandbox.io/s/groupbyid-lv5mp?file=/src/App.js) | ||
@@ -47,0 +60,0 @@ ``` |
@@ -8,2 +8,3 @@ // Useage: arrayToObject(["Mike","Jones",34,true]) | ||
// Returns {firstName: 'Mike', lastName: 'Jones', age: 34, registered: true} | ||
export const arrayToObject = ( values: [], keys: [] ) => { | ||
@@ -10,0 +11,0 @@ const obj: any = {}; |
1173
442
87778