Additional tests
This commit is contained in:
@ -14,7 +14,7 @@ const toHash = (object, key) =>
|
||||
```
|
||||
|
||||
```js
|
||||
toHash([4, 3, 2, 1]); // { 0: 4, 1: 3, 2: 2, 1: 1 }
|
||||
toHash([4, 3, 2, 1]); // { 0: 4, 1: 3, 2: 2, 3: 1 }
|
||||
toHash([{ a: 'label' }], 'a'); // { label: { a: 'label' } }
|
||||
// A more in depth example:
|
||||
let users = [{ id: 1, first: 'Jon' }, { id: 2, first: 'Joe' }, { id: 3, first: 'Moe' }];
|
||||
|
||||
Reference in New Issue
Block a user