GitXplorerGitXplorer
j

string-humanize

public
7 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
9cd429c689ff9ab3957e1476dd60a1803b4149a2

1.0.1

jjxson committed 6 years ago
Unverified
1a390656107d3d371dedd3c57f8f5779de6157e3

Merge branch 'master' of github.com:jxson/string-humanize

jjxson committed 6 years ago
Unverified
282e71017ea678fd8f8ca9ca54b5581f3ec6e773

Update npm test script

jjxson committed 6 years ago
Verified
fe7658702b7e80286ba2052fe25e901ec6342755

Merge pull request #4 from kevgo/patch-1

jjxson committed 6 years ago
Unverified
afa2ba5ededca2d0bb5366eb249360979176c580

Use tape instead of prova

jjxson committed 6 years ago
Verified
8d3baa348ae993cdddeb29eefe21db17aec0f5a9

SVG badge

kkevgo committed 7 years ago

README

The README file for this repository.

string-humanize Build Status

Transforms the input into a human friendly form (just the .humanize() function from string.js).

NPM

browser support

I noticed that there was a TODO in string.js to break things up into smaller modules so I thought I would help out.

Installation

npm install string-humanize

humanize(string)

Transforms the input into a human friendly form

var humanize = require('string-humanize')

humanize('super_snake_case')      // Super snake case
humanize('capitalizedCamelCase')  // Capitalized camel case
humanize('hyphen-case')           // 'Hyphen case'
humanize('no-extensions-here.md') // 'No extensions here'
humanize('lower cased phrase')    // 'Lower cased phrase'
humanize('  so many  spaces  ')   // 'So many spaces'
humanize(123)                     // '123'
humanize('')                      // ''
humanize(null)                    // ''
humanize(undefined)               // ''

Contributing

Fork and send a PR if you see fit, make sure to report any issues.

LICENSE (MIT)

Copyright (c) Jason Campbell ("Author")

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.