JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 26
  • Score
    100M100P100Q63189F
  • License MIT

A string utility module that handles all cases gracefully.

Package Exports

  • casey-js
  • casey-js/dist/casey.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (casey-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

build dependencies npm package vulnerabilities

CaseyJS

A string utility module that handles all cases gracefully.

Installation

Install the package with npm:

npm install casey-js

Include it in your project:

import casey from "casey-js";

Documentation

isString(any)

Returns true if the passed argument is a string or a string object. Otherwise, returns false.

isLowerCase(string)

Returns true if the string is in lower case. Otherwise, returns false.

isUpperCase(string)

Returns true if the string is in upper case. Otherwise, returns false.

isCamelCase(string)

Returns true if the string is in camel case. Otherwise, returns false.

isPascalCase(string)

Returns true if the string is in pascal case. Otherwise, returns false.

isKebabCase(string)

Returns true if the string is in kebab case. Otherwise, returns false.

isSnakeCase(string)

Returns true if the string is in snake case. Otherwise, returns false.

isTrainCase(string)

Returns true if the string is in train case. Otherwise, returns false.

caseOf(string)

Determines the case of the string and returns its name, e.g. CAMEL_CASE. If the string does not match any case, returns null.

toLowerCase(string)

Returns lower-cased string, e.g. foobar.

toUpperCase(string)

Returns upper-cased string, e.g. FOOBAR.

toCamelCase(string)

Returns camel-cased string, e.g. fooBar.

toPascalCase(string)

Returns pascal-cased string, e.g. FooBar.

toKebabCase(string)

Returns kebab-cased string, e.g. foo-bar.

toSnakeCase(string)

Returns snake-cased string, e.g. foo_bar.

toTrainCase(string)

Returns train-cased string, e.g. Foo-Bar.

License

MIT