Travis build: 823 [ci skip]

This commit is contained in:
Travis CI
2018-01-01 18:22:19 +00:00
parent 43981f05cb
commit d6a33877da
2 changed files with 29 additions and 2 deletions

View File

@ -250,6 +250,7 @@
<details> <details>
<summary>View contents</summary> <summary>View contents</summary>
* [`cloneRegExp`](#cloneregexp)
* [`coalesce`](#coalesce) * [`coalesce`](#coalesce)
* [`coalesceFactory`](#coalescefactory) * [`coalesceFactory`](#coalescefactory)
* [`extendHex`](#extendhex) * [`extendHex`](#extendhex)
@ -4284,6 +4285,29 @@ words('python, javaScript & coffee'); // ["python", "javaScript", "coffee"]
--- ---
## 🔧 Utility ## 🔧 Utility
### cloneRegExp
Clones a regular expression.
Use `new RegExp()`, `RegExp.source` and `RegExp.flags` to clone the given regular expression.
```js
const cloneRegExp = regExp => new RegExp(regExp.source, regExp.flags);
```
<details>
<summary>Examples</summary>
```js
const regExp = /lorem ipsum/gi;
const regExp2 = cloneRegExp(regExp); // /lorem ipsum/gi
```
</details>
<br>[⬆ Back to top](#table-of-contents)
### coalesce ### coalesce
Returns the first non-null/undefined argument. Returns the first non-null/undefined argument.

File diff suppressed because one or more lines are too long