@ce1pers/naming-convention-helpers
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@ce1pers/naming-convention-helpers

Simple random helpers.

Installation

npm

npm i @ce1pers/naming-convention-helpers

yarn

yarn add @ce1pers/naming-convention-helpers

Usage

// Import helper.
import { 
    extractNamingConvention,
    camelize,
    pascalize,
    snakeize,
    kebabize
} from "@ce1pers/naming-convention-helpers";

const TEST_TEXT = "naming convetion test message";

const convention = extractNamingConvention(TEST_TEXT);
console.log("convention", convention); // Expected "normal" (Other types - "camel" | "pascal" | "kebab" | "snake")

const camelized = camelize(TEST_TEXT);
console.log("camelized =>", camelized); // Expected "namingConventionTestMessage"

const pascalized = pascalize(TEST_TEXT);
console.log("pascalized =>", pascalized); // Expected "NamingConventionTestMessage"

const snaked = snakeize(TEST_TEXT);
console.log("snaked =>", snaked); // Expected "naming_convention_test_message"

const kebabed = kebabize(TEST_TEXT);
console.log("kebabed =>", kebabed); // Expected "naming-convention-test-message"

Package Sidebar

Install

npm i @ce1pers/naming-convention-helpers

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

24.7 kB

Total Files

25

Last publish

Collaborators

  • __coma__