Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 447 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 447 Bytes

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"