Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
camel-case
Advanced tools
The camel-case npm package is a utility for converting strings into camelCase text. It is often used in programming environments where camelCase is the standard naming convention for identifiers, such as in JavaScript. This package can be particularly useful for formatting strings received from different sources (like user input or external APIs) to match the camelCase naming convention used in a codebase.
Convert string to camelCase
This feature allows you to convert any string, including phrases with spaces or special characters, into camelCase. It's useful for standardizing text input for variable names, object keys, or any other identifiers in code.
const { camelCase } = require('camel-case');
const result = camelCase('hello world');
console.log(result); // 'helloWorld'
change-case is a comprehensive string transformation library that includes camelCase among many other case transformations. It provides more extensive functionality compared to camel-case, which focuses solely on camel casing.
param-case is another package from the same family as camel-case, designed for converting strings into kebab-case (or param-case). While it serves a different specific case conversion, it is similar in its simplicity and focus.
snake-case converts strings to snake_case. Like camel-case, it is focused on a specific string transformation, making it similar in its targeted functionality but different in the type of casing it applies.
Camel case a string. Explicitly adds a single underscore between groups of numbers to keep readability (E.g. 1.20.5
becomes 1_20_5
, not 1205
).
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString
property, numbers and booleans. Empty values (null
and undefined
) will result in an empty string.
npm install camel-case --save
var camelCase = require('camel-case');
camelCase('string'); //=> "string"
camelCase('dot.case'); //=> "dotCase"
camelCase('PascalCase'); //=> "pascalCase"
camelCase('version 1.2.10'); //=> "version1_2_10"
camelCase('STRING 1.2', 'tr'); //=> "strıng1_2"
MIT
FAQs
Transform into a string with the separator denoted by the next word capitalized
The npm package camel-case receives a total of 13,507,372 weekly downloads. As such, camel-case popularity was classified as popular.
We found that camel-case 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.