@kklab/stryle
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @kklab/stryle

Weekly Downloads

11

Version

0.0.10

License

MIT

Unpacked Size

6.78 kB

Total Files

8

Last publish

Collaborators

  • williamchou