Travis build: 2036

This commit is contained in:
30secondsofcode
2018-05-06 15:13:09 +00:00
parent 239ddd904f
commit 1dd6bd8b26
12 changed files with 36 additions and 11 deletions

View File

@ -210,6 +210,7 @@ average(1, 2, 3);
* [`hide`](#hide)
* [`httpsRedirect`](#httpsredirect)
* [`isBrowserTabFocused`](#isbrowsertabfocused)
* [`nodeListToArray`](#nodelisttoarray)
* [`observeMutations`](#observemutations-)
* [`off`](#off)
* [`on`](#on)
@ -3450,6 +3451,28 @@ isBrowserTabFocused(); // true
<br>[⬆ Back to top](#table-of-contents)
### nodeListToArray
Converts a `NodeList` to an array.
Use `Array.prototype.slice()` and `Function.prototype.call()` to convert a `NodeList` to an array.
```js
const nodeListToArray = nodeList => Array.prototype.slice.call(nodeList);
```
<details>
<summary>Examples</summary>
```js
nodeListToArray(document.childNodes); // [ <!DOCTYPE html>, html ]
```
</details>
<br>[⬆ Back to top](#table-of-contents)
### observeMutations ![advanced](/advanced.svg)
Returns a new MutationObserver and runs the provided callback for each mutation on the specified element.