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.
change-case-object
Advanced tools
Changes the case of all keys in an object or array. In its simplest form it also changes the key itself if a string is passed in.
npm install change-case-object
Currently, only CommonJS environments are supported. (This means Node.js and browser with browserify
or webpack
)
var changeCaseObject = require('change-case-object');
var myObject = {
hello_world: 'hi',
};
var newObject = changeCaseObject.camelCase(myObject);
// {helloWorld: 'hi'}
All methods are available under the changeCaseObject
object after the module has been required.
Conerts all object keys into camel case.
hello_world -> helloWorld
Conerts all object keys into snake case.
helloWorld -> hello_world
Conerts all object keys into param case.
helloWorld -> hello-world
Shorthand methods are also available:
.camelCase -> .camel
.snakeCase -> .snake
.paramCase -> .param
AirBnB ES5
MIT
2.0.0 Object values are no longer being transformed by default
1.1.1 Stricter checking for code guideline
1.1.0 Add support for arrays and primitives
1.0.0 Initial version
FAQs
Changes the case of all keys of an object
The npm package change-case-object receives a total of 4,800 weekly downloads. As such, change-case-object popularity was classified as popular.
We found that change-case-object 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.