0.0.2 • Published 12 months ago

@standardkit/caas v0.0.2

Weekly downloads
-
License
Unlicense
Repository
github
Last release
12 months ago

npm version codecov

Case-as-a-Service

@standardkit/caas

Heads Up

While this package is of course amazing and groundbreaking and has definitely never been done before, it is subject to change since we're not quite in version 1 yet.

Feedback is always welcome just take into account this is not currently polished for random people to start using it.

So if you want to use it but you're missing something, let me know. We'll make it happen.

Installation

npm i @standardkit/caas

Usage

Extracting from PascalCase

import { depascalize } from '@standardkit/caas';

const result = depascalize('CaseExample');

// ['case', 'example']

Converting to camelCase

import { camel } from '@standardkit/caas';

const result = camel(['case', 'example']);

// 'caseExample'

What is it?

A utility package to change case. It currently supports:

Supported cases

  • kebab-case
  • snake_case
  • camelCase
  • PascalCase
  • human case (maybe needs a different name)
  • path/case
  • Sentence case
  • Title Case

Helper functions

  • capitalize: capitalizes first letter of a string
  • depascalize: takes PascalCase, converts to segments (lowercase string[])

Roadmap

  • Case Detection
  • Case Conversion
  • Validation
  • Sanitize
  • Batch conversion

Useful Case Implementations

  • CONST_CASE
  • dot.case
  • BEM__case
  • lowercase (Function instead of string operation for use in maps)
  • UPPERCASE (Function instead of string operation for use in maps)

License

Unlicense - Do whatever you want.

View LICENSE file for details.

Development

Hit me up if you want to discuss anything. All feedback is welcome.

Publishing

Preparations

Make sure to have access to the @standardkit organization on npm, and login with: npm login

Release

npm run release:patch
npm run release:minor
npm run release:major

Under the hood this translates to: 1. npm test 2. npm run build 3. npm version patch|minor|major 4. npm publish

0.0.2

12 months ago

0.0.1

12 months ago