Nefariously Programmed Mecha

    @magic/cases

    0.0.5 • Public • Published

    @magic/cases

    convert between camelCase, PascalCase, snake_case, and kebab-case.

    html-docs

    NPM version Linux Build Status Windows Build Status Coverage Status Greenkeeper badge Known Vulnerabilities

    install

    be in a nodejs project.

    npm i --save-dev @magic/cases

    usage

    import cases from '@magic/cases'
    
    const string = 'some-case-string'
    
    const camelized = cases.camel('some-case-string')  // someCaseString
    
    const snaked = cases.snake('some-case-string')  // some_case_string
    
    const pascaled = cases.pascal('some-case-string') // SomeCaseString
    
    const kebabed = cases.kebab('some-case-string')  // some-case-string
    
    console.log({ camelized, snaked, pascaled, kebabed })

    changelog

    0.0.1

    first commit, four case types work.

    0.0.2

    add kebabCaps and snakeCaps for KEBAB-CAPS and SNAKE_CAPS

    0.0.3

    bump required node version to 14.2.0

    0.0.4

    bump required node version to 14.15.4

    0.0.5

    FIX: kebabcase handles camelCase strings that end with an uppercase character correctly (this fixes overflowX in @magic/css)

    0.0.6 - unreleased

    ...

    Install

    npm i @magic/cases

    DownloadsWeekly Downloads

    26

    Version

    0.0.5

    License

    AGPL-3.0

    Unpacked Size

    39.1 kB

    Total Files

    4

    Last publish

    Collaborators

    • jascha
    • jaeh