![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@jerridan/convert-keys
Advanced tools
A tool for converting object keys between camel case, snake case and kebab case.
ConvertKeys
is a tool for converting object keys between camel case, snake case and kebab case.
Install ConvertKeys
via npm or yarn:
npm install @jerridan/convert-keys
# or
yarn add @jerridan/convert-keys
ConvertKeys exports three functions:
toSnakeCase
-> for converting keys to snake casetoCamelCase
-> for converting keys to camel casetoKebabCase
-> for converting keys to kebab caseEach function accepts two arguments:
input
-> the object or array to convertoverrides
-> an optional object containing overrides for specific key conversionsConverting an object
toSnakeCase({ objectKey: "value" });
// Output: { object_key: "value" }
Converting a complex nested object
toCamelCase({
object_key: [
[{ nested_key: 1 }, { nested_key: 2 }],
[{ nested_key: 3 }, { nested_key: 4 }],
],
});
// Output:
// {
// objectKey: [
// [{ nestedKey: 1 }, { nestedKey: 2 }],
// [{ nestedKey: 3 }, { nestedKey: 4 }],
// ],
// }
Using overrides
const overrides = { nestedKey: "overridden-key" };
toKebabCase({ objectKey: { nestedKey: "value" } }, overrides);
// Output:
// { "object-key": { "overridden-key": "value" } }
Contributions to this project are welcome. Please follow these general guidelines:
This project is released under the MIT License. For more details, see the LICENSE file in the repository.
[1.0.0] - 2023-12-07
toSnakeCase
function for converting object keys to snake casetoCamelCase
function for converting object keys to camel casetoKebabCase
function for converting object keys to kebab caseoverrides
argument for overriding specific key conversionsFAQs
A tool for converting object keys between camel case, snake case and kebab case.
The npm package @jerridan/convert-keys receives a total of 0 weekly downloads. As such, @jerridan/convert-keys popularity was classified as not popular.
We found that @jerridan/convert-keys 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.