Socket
Socket
Sign inDemoInstall

caser.js

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    caser.js

A lightweight library which lets you convert string cases.


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

caser.js

A lightweight library which lets you convert string cases.

Download: NPM: npm install caser.js

NPM version NPM

Index

  • camelCase
  • pascalCase
  • kebabCase
  • snakeCase
  • pathCase

Usage

const caser = require('caser.js');
camelCase

Code Helper

caser.camelCase('foo bar')        -> 'fooBar'
pascalCase

Code Helper

caser.pascalCase('foo bar')      -> 'FooBar'
kebabCase
caser.kebabCase('Foo Bar')       -> 'Foo-Bar'
caser.kebabCaseLower('Foo Bar')  -> 'foo-bar'
caser.kebabCaseUpper('Foo Bar')  -> 'FOO-BAR'
snakeCase
caser.snakeCase('Foo bar')       -> 'Foo_bar'
caser.snakeCaseLower('Foo bar')  -> 'foo_bar'
caser.snakeCaseUpper('Foo bar')  -> 'FOO_BAR'
pathCase
caser.pathCase('Foo bar')       -> 'Foo/bar'
caser.pathCaseLower('Foo bar')  -> 'foo/bar'
caser.pathCaseUpper('Foo bar')  -> 'FOO/BAR'
Info

It sanitizes Turkish words such as "ş".

Release History

  • 2021-8-16 Republished
  • 2021-1-12 v1.0.6 (Fixed some issues.)
  • 2021-1-12 v1.0.5 (Added Path Case.)
  • 2021-1-12 v1.0.4 (Fixed some bugs.)
  • 2021-1-12 v1.0.3 (Edited README due to an old version.)
  • 2021-1-12 v1.0.2 (Added normal kebab and snake case.)
  • 2021-1-12 v1.0.1 (First version, not much options.)

FAQs

Last updated on 16 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc