@kklab/stryle
v0.0.10
Published
A collection of utility functions for transforming string case.
Downloads
55
Readme
stryle
A collection of utility functions for transforming string case.
Usage
Using with ES Modules
Import the module and use it in your code:
import { toTitleCase } from '@kklab/stryle';
const output = toTitleCase('hello, stryle!', {
fixedTerms: ['STRYLE'],
});
console.log(output);
// Output:
// Hello, STRYLE!
Using with UMD Modules
Include the UMD script in your HTML file and use it:
<script src="https://unpkg.com/@kklab/stryle/dist/index.umd.js"></script>
<script>
const output = window.Stryle.toTitleCase('hello, stryle!', {
fixedTerms: ['STRYLE'],
});
console.log(output);
// Output:
// Hello, STRYLE!
</script>
Development
To start a local development server, run:
npm run dev
Testing
To run the tests for this package, run:
npm run test