1.1.0 • Published 4 years ago

@salestrip/string v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@salestrip/string

Codefresh build status

String utilities.

Install

npm i -S @salestrip/string

Usage

Some example uses are included below including some of the domain-specific behaviours. Please refer to the test suite for further examples.

const string = require('@salestrip/string')

string.camelize('some-string.type') // 'someStringType'

string.constantize('some-str.type') // 'SOME_STR_TYPE'

string.titleize('man from uncle') // 'Man from Uncle'

string.singularize('travellers') // 'person'

string.pluralize('traveller') // 'people'

Release

To release a new version, use npm. Using npm version will update the version in package.json before committing the resulting file change to git and adding the appropriate git tag. Pushing a tagged version to origin will trigger a CI deployment to the npm registry.

To release a bugfix update the patch version.

npm version patch
git push
git push --tags

To release a feature update the minor version.

npm version minor
git push
git push --tags

To release a breaking change update the major version.

npm version major
git push
git push --tags

License

Copyright © 2019 SalesTrip Limited. All rights reserved.