
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@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.1.0] - 2024-01-07
lodash.isplainobject
in favour of custom utilityFAQs
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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.