
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
caseforge - Effortlessly convert between snake_case, camelCase, and more in TypeScript. Zero dependencies, type-safe, and easy to use for any project.
Type-safe and lightweight case conversion library for TypeScript.
npm install caseforge
import {
toCamelCase,
toSnakeCase,
toKebabCase,
toPascalCase,
toUpperCase,
isCamelCase,
isSnakeCase,
isKebabCase,
isPascalCase,
isUpperCase
} from "caseforge";
// String conversion
toCamelCase("user_name"); // => "userName"
toSnakeCase("userName"); // => "user_name"
toKebabCase("userName"); // => "user-name"
toPascalCase("user_name"); // => "UserName"
toUpperCase("userName"); // => "USER_NAME"
// Case format detection
isCamelCase("userName"); // => true
isSnakeCase("user_name"); // => true
isKebabCase("user-name"); // => true
isPascalCase("UserName"); // => true
isUpperCase("USER_NAME"); // => true
// Object conversion with type inference
const apiResponse = {
user_id: 123,
user_name: "John",
user_settings: {
notification_enabled: true
}
};
const result = toCamelCase(apiResponse);
// result.userId (typed!)
// result.userName (typed!)
// result.userSettings.notificationEnabled (typed!)
// Detect API response format and convert accordingly
const sampleKey = Object.keys(apiResponse)[0];
if (isSnakeCase(sampleKey)) {
const converted = toCamelCase(apiResponse);
// Use converted data
}
toCamelCase(input) - Converts to camelCasetoSnakeCase(input) - Converts to snake_casetoKebabCase(input) - Converts to kebab-casetoPascalCase(input) - Converts to PascalCasetoUpperCase(input) - Converts to UPPER_SNAKE_CASEisCamelCase(value) - Checks if a string is in camelCase formatisSnakeCase(value) - Checks if a string is in snake_case formatisKebabCase(value) - Checks if a string is in kebab-case formatisPascalCase(value) - Checks if a string is in PascalCase formatisUpperCase(value) - Checks if a string is in UPPER_SNAKE_CASE formatMIT © Chikada Hiroki
FAQs
caseforge - Effortlessly convert between snake_case, camelCase, and more in TypeScript. Zero dependencies, type-safe, and easy to use for any project.
We found that caseforge demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.