humanize-string
Version:
Convert a camelized/dasherized/underscored string into a humanized one: `fooBar-Baz_Faz` → `Foo bar baz faz`
30 lines (19 loc) • 526 B
Markdown
> Convert a camelized/dasherized/underscored string into a humanized one
> Example: `fooBar-Baz_Faz` → `Foo bar baz faz`
```sh
npm install humanize-string
```
```js
import humanizeString from 'humanize-string';
humanizeString('fooBar');
//=> 'Foo bar'
humanizeString('foo-bar');
//=> 'Foo bar'
humanizeString('foo_bar');
//=> 'Foo bar'
```
- [camelcase](https://github.com/sindresorhus/camelcase) - Convert a dash/dot/underscore/space separated string to camelcase