Fix snippets typos

This commit is contained in:
Schneider
2019-04-08 11:21:59 -03:00
parent cf684410f3
commit 4b37bf6ef5
4 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
Returns a string with whitespaces compacted.
Use `String.prototype.replace()` with a regular expression to replace all occurences of 2 or more whitespace characters with a single space.
Use `String.prototype.replace()` with a regular expression to replace all occurrences of 2 or more whitespace characters with a single space.
```js
const compactWhitespace = str => str.replace(/\s{2,}/g, ' ');