plexis-js / plexis

Lo-fi, powerful, community-driven string manipulation library.
MIT License
147 stars 42 forks source link

Feature request: `toKebabCase / dasherize / slugify ` #17

Open vorillaz opened 5 years ago

vorillaz commented 5 years ago

Converts the input text to kebab case.

Example usage

import toKebabCase from '@plexis/to-kebab-case';

toKebabCase('Cool');
// => 'cool'

toKebabCase('cool mate');
// => 'cool-mate'

toKebabCase('Hey how are you today?');
// => 'hey-how-are-you-today'

toKebabCase('camelCase');
// => 'camel-case'

toKebabCase('PascalCase');
// => pascal-case

Aliases

import toKebabCase from '@plexis/to-kebab-case';
import {toKebabCase, dasherize, slugify} from 'plexis';
aceol commented 5 years ago

Hi, I'm creating a PR, that's an interesting case!

vorillaz commented 5 years ago

@aceol I will review it ASAP, thanks for the contribution.