@plexis/to-human

Converts a string into a human readable text

Usage no npm install needed!

<script type="module">
  import plexisToHuman from 'https://cdn.skypack.dev/@plexis/to-human';
</script>

README

@plexis/to-human

Converts a string into a human readable text

Installation

npm i @plexis/to-human

Usage

import toHuman from '@plexis/to-human';

toHuman('foo'); // => 'Foo'
toHuman('foo     bar'); // => 'Foo bar'
toHuman(' foo-bar  baz quxQuux corge_grault GarplyWaldo'); // => 'Foo bar baz qux quux corge grault garply waldo'
toHuman(' foo-bar-baz qux       quux'); // => 'Foo bar baz qux quux'

Aliases

import toHuman from '@plexis/to-human';
import {toHuman, humanize} from 'plexis';