This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@soyhuce/bob.case-converter
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@soyhuce/bob.capitalize

Case converter function from Bob library.

Installation

pnpm add @soyhuce/bob.case-converter

Usage

import caseConverter from '@soyhuce/bob.case-converter'

console.log(
    caseConverter.stringCaseConverter<string>(
        'helloWorld',
        Cases.CAMEL_CASE,
        Cases.KEBAB_CASE
    )
)
/*

 Output:

'hello-world'

*/

interface MyObject extends Record<string, unknown> {
    'my_property1': boolean
    'my_property2': string
    'my_property3': number
}

console.log(caseConverter.objectCaseConverter<MyObject>({
    'my_property1': false,
    'my_property2': 'hello world',
    'my_property3': 14000
}, Cases.SNAKE_CASE, Cases.CAMEL_CASE))
/*

Output:

{
  'myProperty1': false,
  'myProperty2': 'hello world'
  'myProperty3': 14000
}

*/

License

MIT

Package Sidebar

Install

npm i @soyhuce/bob.case-converter

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

10.9 kB

Total Files

10

Last publish

Collaborators

  • adminsoyhuce
  • benoit.zuinghedau
  • m4ss1v3s3r0t0n14
  • nexoid