Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hyphenate

vilic9.4kMIT0.2.5TypeScript support: included

A simple helper function that hyphenates phrases.

readme

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"