Socket
Socket
Sign inDemoInstall

js-camel-to-kebab

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    js-camel-to-kebab

Utility for convert camel case to kebab case.


Version published
Maintainers
1
Install size
1.67 kB
Created

Readme

Source

js-camel-to-kebab

Utility for convert camel case to kebab case.

Install

npm install js-camel-to-kebab

Synopsis

Convert camel case string to kebab case.

var test = require('tape');

// you must import like
// import camelToKebab from 'js-camel-to-kebab';
var camelToKebab = require('./umd/').default;

test('Convert to kebab case from camel case', function (t) {
  t.plan(1);
  t.equal(camelToKebab('HelloWorld'), "hello-world");
});

Also if the string have kebab case then this don't is coverted

test('Don`t convert already kebab case', function (t) {
  t.plan(1);
  t.equal(camelToKebab('this-string-already-haveKebabCase'), 'this-string-already-have-kebab-case');
});

FAQs

Last updated on 14 Oct 2018

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