docs: prototype.prototype -> prototype
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
### shank
|
### shank
|
||||||
|
|
||||||
Has the same functionality as [`Array.prototype.prototype.splice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice), but returning a new array instead of mutating the original array.
|
Has the same functionality as [`Array.prototype.splice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice), but returning a new array instead of mutating the original array.
|
||||||
|
|
||||||
Use `Array.prototype.slice()` and `Array.prototype.concat()` to get a new array with the new contents after removing existing elements and/or adding new elements.
|
Use `Array.prototype.slice()` and `Array.prototype.concat()` to get a new array with the new contents after removing existing elements and/or adding new elements.
|
||||||
Omit the second argument, `index`, to start at `0`.
|
Omit the second argument, `index`, to start at `0`.
|
||||||
@ -21,4 +21,3 @@ const namesAndDelta = shank(names, 1, 0, 'delta'); // [ 'alpha', 'delta', 'bravo
|
|||||||
const namesNoBravo = shank(names, 1, 1); // [ 'alpha', 'charlie' ]
|
const namesNoBravo = shank(names, 1, 1); // [ 'alpha', 'charlie' ]
|
||||||
console.log(names); // ['alpha', 'bravo', 'charlie']
|
console.log(names); // ['alpha', 'bravo', 'charlie']
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Reduces a given Array-like into a value hash (keyed data store).
|
Reduces a given Array-like into a value hash (keyed data store).
|
||||||
|
|
||||||
Given an Iterable or Array-like structure, call `Array.prototype.prototype.reduce.call()` on the provided object to step over it and return an Object, keyed by the reference value.
|
Given an Iterable or Array-like structure, call `Array.prototype.reduce.call()` on the provided object to step over it and return an Object, keyed by the reference value.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const toHash = (object, key) =>
|
const toHash = (object, key) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user