Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Utility functions for converting under_score
style strings to camelCase
and the reverse, as well as on objects.
Also works on objects for converting all property names, as well as stripping or modifying keys before running.
camelCase(string)
- convert a underscored string to camel-case. Note: leading and trailing _
will not be affected.underscore(string)
- convert a camel-cased string to underscores. Note: leading and trailing _
will not be affected.camelize(object, fn)
- convert an object's underscored property names to camel-case. Optionally run fn
through map
function first.underscorify(object, fn)
- convert an object's camel-cased property names to underscores. Optionally run fn
through map
function first.var camelscore = require('camelscore');
var camelCased = camelscore.camelize({
foo_bar: {
hello_world: "hello world!"
}
});
Will result in:
{
"fooBar": {
"helloWorld": "hello world!"
}
}
To use map
function:
var camelscore = require('camelscore');
var camelCased = camelscore.camelize({
foo_bar: {
hello_world: "hello world!",
goodbye: "goodbye"
}
}, function (k) {
return k === 'goobye' ? undefined : k;
});
Will result in:
{
"fooBar": {
"helloWorld": "hello world!"
}
}
FAQs
camelCase and under_score utilities for objects.
The npm package camelscore receives a total of 629 weekly downloads. As such, camelscore popularity was classified as not popular.
We found that camelscore 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.