package
Convert a camelized/dasherized/underscored string into a humanized one: `fooBar-Baz_Faz` → `Foo bar baz faz`
npm install humanize-stringGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Convert a camelized/dasherized/underscored string into a humanized one Example:
fooBar-Baz_Faz→Foo bar baz faz
npm install humanize-stringimport humanizeString from 'humanize-string';
humanizeString('fooBar');
//=> 'Foo bar'
humanizeString('foo-bar');
//=> 'Foo bar'
humanizeString('foo_bar');
//=> 'Foo bar'Type: string
The string to humanize.
Type: object
Type: boolean
Default: false
Preserve the original case instead of lowercasing.
import humanizeString from 'humanize-string';
humanizeString('The-NetApp-Guide-to-Kubernetes');
//=> 'The net app guide to kubernetes'
humanizeString('The-NetApp-Guide-to-Kubernetes', {preserveCase: true});
//=> 'The NetApp Guide to Kubernetes'Estimated unpacked size across 2 packages.
14.1 kB
Includes dependencies.