Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Transform any case string into a lower case string with a space between each word
The no-case npm package is a utility for converting strings to lower case with spaces between words. It is useful for transforming strings into a more readable format, especially for user interfaces or data processing.
Convert camelCase to no-case
This feature converts a camelCase string into a no-case string, where words are separated by spaces and all letters are in lower case.
const noCase = require('no-case');
const result = noCase('camelCaseString');
console.log(result); // Output: 'camel case string'
Convert snake_case to no-case
This feature converts a snake_case string into a no-case string, where underscores are replaced by spaces and all letters are in lower case.
const noCase = require('no-case');
const result = noCase('snake_case_string');
console.log(result); // Output: 'snake case string'
Convert kebab-case to no-case
This feature converts a kebab-case string into a no-case string, where hyphens are replaced by spaces and all letters are in lower case.
const noCase = require('no-case');
const result = noCase('kebab-case-string');
console.log(result); // Output: 'kebab case string'
The change-case package provides a set of utilities for converting strings between different cases, such as camelCase, snake_case, and kebab-case. It offers more comprehensive functionality compared to no-case, as it supports multiple case transformations.
Lodash is a utility library that provides a wide range of functions for manipulating arrays, objects, and strings. It includes methods for case conversion, such as _.camelCase, _.snakeCase, and _.kebabCase, making it a versatile alternative to no-case.
Voca is a string manipulation library that offers a variety of functions for working with strings, including case conversion. It provides methods like voca.camelCase, voca.snakeCase, and voca.kebabCase, similar to the functionality provided by no-case.
Transform any case string into a lower case string with a space between each word. Example:
foo_bar
=>fooBar
npm install no-case --save
import { noCase } from "no-case";
noCase("string"); //=> "string"
noCase("dot.case"); //=> "dot case"
noCase("PascalCase"); //=> "pascal case"
noCase("version 1.2.10"); //=> "version 1 2 10"
Optional options
as the second argument:
separateNumbers: boolean
- Splits numbers apart from letters, e.g. V1
-> v 1
.locale: string | false
- Lower case according to a specific locale
, defaulting to the current system locale.MIT
FAQs
Transform any case string into a lower case string with a space between each word
The npm package no-case receives a total of 18,058,070 weekly downloads. As such, no-case popularity was classified as popular.
We found that no-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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.