Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
camel-to-kebab
Advanced tools
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.
This library is very lightweight at 892 bytes minified and 467 bytes gzipped. It requires no external dependencies, and it's licensed according to the permissive zlib/libpng license.
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
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="camel-to-kebab.min.js"></script>
const camelToKebabCase = require("camel-to-kebab");
// prints "hello-world"
console.log(camelToKebabCase("helloWorld"));
// prints "camel-to-kebab-case"
console.log(camelToKebabCase("camelToKebabCase"));
// prints "testing-123"
console.log(camelToKebabCase("testing123"));
// prints "inner-html"
console.log(camelToKebabCase("innerHTML"));
// prints "border-top-left-radius"
console.log(camelToKebabCase("borderTopLeftRadius"));
FAQs
Convert camelCase inputs to kebab-case outputs.
The npm package camel-to-kebab receives a total of 1,363 weekly downloads. As such, camel-to-kebab popularity was classified as popular.
We found that camel-to-kebab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.