A collection of utility functions for transforming string case.
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!
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>
To start a local development server, run:
npm run dev
To run the tests for this package, run:
npm run test