Update toKebabCase.md
This commit is contained in:
committed by
GitHub
parent
272a6f12dc
commit
85dd2de7a9
@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user