npm.io
0.2.5 • Published 6 years ago

hyphenate

Licence
MIT
Version
0.2.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0

Hyphenate Build Status

A simple helper function that splits and then joins words back together.

Install

yarn add hyphenate

Usage

import hyphenate from 'hyphenate';

hyphenate('hello, world!'); // "hello-world"
hyphenate('JSONDataItems'); // "JSON-Data-Items"
hyphenate('JSONDataItems', {lowerCase: true}); // "json-data-items"