Fix typos in descriptions
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
Removes any properties except the ones specified from a JSON object.
|
Removes any properties except the ones specified from a JSON object.
|
||||||
|
|
||||||
Use `Object.keys()` method to loop over given json object and deleting keys that are not `include`d in given array.
|
Use `Object.keys()` method to loop over given json object and deleting keys that are not `include`d in given array.
|
||||||
also if you give it a special key(`childIndicator`) it will search deeply inside it to apply function to inner objects too.
|
Also if you give it a special key (`childIndicator`) it will search deeply inside it to apply function to inner objects too.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const cleanObj = (obj, keysToKeep = [], childIndicator) => {
|
const cleanObj = (obj, keysToKeep = [], childIndicator) => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### countOccurrences
|
### countOccurrences
|
||||||
|
|
||||||
Counts the occurences of a value in an array.
|
Counts the occurrences of a value in an array.
|
||||||
|
|
||||||
Use `Array.reduce()` to increment a counter each time you encounter the specific value inside the array.
|
Use `Array.reduce()` to increment a counter each time you encounter the specific value inside the array.
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
Converts a string from camelcase.
|
Converts a string from camelcase.
|
||||||
|
|
||||||
Use `replace()` to remove underscores, hyphens and spaces and convert words to camelcase.
|
Use `replace()` to remove underscores, hyphens and spaces and convert words to camelcase.
|
||||||
Omit the scond argument to use a default separator of `_`.
|
Omit the second argument to use a default separator of `_`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const fromCamelCase = (str, separator = '_') =>
|
const fromCamelCase = (str, separator = '_') =>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Returns the native type of a value.
|
Returns the native type of a value.
|
||||||
|
|
||||||
Returns lower-cased constructor name of value, "undefined" or "null" if value is undefined or null
|
Returns lowercased constructor name of value, "undefined" or "null" if value is undefined or null
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const getType = v =>
|
const getType = v =>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### initializeArrayWithRange
|
### initializeArrayWithRange
|
||||||
|
|
||||||
Initialized an array containing the numbers in the specified range.
|
Initializes an array containing the numbers in the specified range.
|
||||||
|
|
||||||
Use `Array(end-start)` to create an array of the desired length, `Array.map()` to fill with the desired values in a range.
|
Use `Array(end-start)` to create an array of the desired length, `Array.map()` to fill with the desired values in a range.
|
||||||
You can omit `start` to use a default value of `0`.
|
You can omit `start` to use a default value of `0`.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### take
|
### take
|
||||||
|
|
||||||
Returns an array with n elements removed from the beggining.
|
Returns an array with n elements removed from the beginning.
|
||||||
|
|
||||||
Use `Array.slice()` to create a slice of the array with `n` elements taken from the beginning.
|
Use `Array.slice()` to create a slice of the array with `n` elements taken from the beginning.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user