
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
object-case-converter
Advanced tools
Convert keys in an javascript object for some cases(camelCase, snake_case, etc.)
Convert keys in an javascript Object or Array to the specific forms(camelCase, snake_case, etc.)
$ npm install --save object-case-converter
import { camelCase, snakeCase } from 'object-case-converter';
const result1 = camelCase(null);
// result1 = null
const result2 = camelCase({
id: '1',
nick_name: 'nick1',
contacts: [{ contact_type: 'phone', value: '000-000-000' }, { contact_type: 'email', value: 'test@email.com' }],
news_letter: { all_email: false, marketing_email: false },
});
// result2 = {
// id: '1',
// nickName: 'nick1',
// contacts: [{ contact_type: 'phone', value: '000-000-000' }, { contact_type: 'email', value: 'test@email.com' }],
// newsLetter: { all_email: false, marketing_email: false },
//}
const result3 = snakeCase([
{ id: '1', nickName: 'nick1', contacts: [{ contactType: 'phone', value: '000-000-000' }, { contactType: 'email', value: 'test@email.com' }] },
{ id: '2', nickName: 'nick2', contacts: [] },
{ id: '3', nickName: 'nick3', contacts: [{ contactType: 'address', value: 'xxx' }] },
], true);
// result3 = [
// { id: '1', nick_name: 'nick1', contacts: [{ contact_type: 'phone', value: '000-000-000' }, { contact_type: 'email', value: 'test@email.com' }] },
// { id: '2', nick_name: 'nick2', contacts: [] },
// { id: '3', nick_name: 'nick3', contacts: [{ contact_type: 'address', value: 'xxx' }] },
//]
var converter = require('object-case-converter');
converter.camelCase(...);
converter.snakeCase(...);
Convert keys in an object or objects in an array to camelCase
Convert keys in an object or objects in an array to snake_case
$ git clone git@github.com:ridibooks/object-case-converter.git
$ cd object-case-converter
$ npm install
Webpack build using Babel (Not required in development.)
$ npm run build
Tests using Jest
$ npm test
FAQs
Convert keys in an javascript object for some cases(camelCase, snake_case, etc.)
We found that object-case-converter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.