Update toKebabCase.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-12-16 13:42:27 +02:00
committed by GitHub
parent 272a6f12dc
commit 85dd2de7a9

View File

@ -6,7 +6,7 @@ tags: string,regexp,intermediate
Converts a string to kebab case.
- Use `String.prototype.match()` to break the string into words using an appropriate regexp.
- Use `Array.prototype.map()`, `Array.prototype.slice()`, `Array.prototype.join()` and `String.prototype.toLowerCase()` to combine them, adding `-` as a separator.
- Use `Array.prototype.map()`, `Array.prototype.join()` and `String.prototype.toLowerCase()` to combine them, adding `-` as a separator.
```js
const toKebabCase = str =>