Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qard/inflectjs
Provides basic inflection utilities and formatters for camelCase and separations.
https://github.com/qard/inflectjs
Last synced: 12 days ago
JSON representation
Provides basic inflection utilities and formatters for camelCase and separations.
- Host: GitHub
- URL: https://github.com/qard/inflectjs
- Owner: Qard
- Created: 2011-07-26T02:22:15.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-07-26T03:49:34.000Z (over 13 years ago)
- Last Synced: 2024-10-19T19:55:38.226Z (about 1 month ago)
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# InflectJS
InflectJS Provides basic inflection utilities and formatters for camelCase and separations.## API
plural(str [, keep_case]) -- Convert a singular word to plural. Lowercases by default.
singular(str [, keep_case]) -- Convert a plural word to singular. Lowercases by default.
camel(str) -- Merge separated words, spaces or otherwise, to a camelcased word.
separate(str, splitter, keep_case) -- Separate words using define separator. Also converts camelcased words. Lowercases by default.
underscores(str, keep_case) -- Alias for separating with _
dashes(str, keep_case) -- Alias for separating with -
pluses(str, keep_case) -- Alias for separating with +
human(str, caps_all) -- Convert separated or camelcased words to a human readable format.
trim(str) -- Trim whitespace from a string.