Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

camel-to-kebab

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camel-to-kebab

Convert camelCase inputs to kebab-case outputs.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-3.08%
Maintainers
1
Weekly downloads
 
Created
Source

camelToKebabCase

Build Status

This is a JavaScript library implementing one function, camelToKebabCase. It accepts a camelCase string as input and outputs a kebab-case equivalent. It also works for PascalCase inputs.

The package is licensed according to the very permissive zlib/libpng license.

Installation

You can add camelToKebabCase to your JavaScript project by using a package manager to install the camel-to-kebab package. For example:

npm install --save camel-to-kebab

Usage

camelToKebabCase can be used in the browser, imported as a CommonJS module, or imported as an ES module.

// Import camel-to-kebab as a CommonJS module
const camelToKebabCase = require("camel-to-kebab");
// Import camel-to-kebab as an ES module
import camelToKebabCase from "camel-to-kebab";
<!-- Use camel-to-kebab in the browser -->
<script src="../src/camel-to-kebab.js"></script>

Examples

const camelToKebabCase = require("camel-to-kebab");

// prints "hello-world"
console.log(camelToKebabCase("helloWorld"));

// prints "camel-to-kebab-case"
console.log(camelToKebabCase("camelToKebabCase"));

// prints "border-top-left-radius"
console.log(camelToKebabCase("borderTopLeftRadius"));

Keywords

FAQs

Package last updated on 03 May 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc