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.
text-tweak is your go-to toolkit for hassle-free string casing formatting in JavaScript/TypeScript. With a suite of intuitive functions, you can effortlessly convert text between various casing styles, whether it's lowercase, UPPERCASE, Title Case, camelC
text-tweak is a lightweight JavaScript/TypeScript package for effortless string casing formatting. With text-tweak, you can easily convert text between various casing styles such as lowercase, UPPERCASE, Title Case, camelCase, snake_case, kebab-case, PascalCase, and more.
To install text-tweak, simply use npm:
npm install text-tweak
To use the functions provided by the text-tweak
package, follow these steps:
text-tweak
package:import {
toLowerCase,
toUpperCase,
toTitleCase,
toSentenceCase,
toCamelCase,
toSnakeCase,
toKebabCase,
toPascalCase,
toConstantCase,
toDotCase,
toPathCase,
toAlternatingCase,
toInvertedCase,
toSpongeCase,
toReverseCase,
toSmallCaps
} from 'text-tweak';
Converts a string to lowercase.
const text = 'Hello World';
const lowerCaseText = toLowerCase(text);
console.log(lowerCaseText); // Output: 'hello world'
Converts a string to uppercase.
const text = 'Hello World';
const upperCaseText = toUpperCase(text);
console.log(upperCaseText); // Output: 'HELLO WORLD'
Converts a string to camel case.
const text = 'hello world';
const camelCaseText = toCamelCase(text);
console.log(camelCaseText); // Output: 'Hello World'
Converts a string to camel case.
const text = 'hello world';
const camelCaseText = toCamelCase(text);
console.log(camelCaseText); // Output: 'Hello world'
Converts a string to camel case.
const text = 'hello world';
const camelCaseText = toCamelCase(text);
console.log(camelCaseText); // Output: 'helloWorld'
Converts a string to kebab case.
const text = 'Hello World';
const kebabCaseText = toKebabCase(text);
console.log(kebabCaseText); // Output: 'hello-world'
Converts a string to Pascal case.
const text = 'hello world';
const pascalCaseText = toPascalCase(text);
console.log(pascalCaseText); // Output: 'HelloWorld'
Converts a string to constant case.
const text = 'Hello World';
const constantCaseText = toConstantCase(text);
console.log(constantCaseText); // Output: 'HELLO_WORLD'
Converts a string to dot case.
const text = 'Hello World';
const dotCaseText = toDotCase(text);
console.log(dotCaseText); // Output: 'hello.world'
Converts a string to path case.
const text = 'Hello World';
const pathCaseText = toPathCase(text);
console.log(pathCaseText); // Output: 'hello/world'
Converts a string to alternating case.
const text = 'Hello World';
const alternatingCaseText = toAlternatingCase(text);
console.log(alternatingCaseText); // Output: 'HeLlO wOrLd'
Converts a string to inverted case.
const text = 'Hello World';
const invertedCaseText = toInvertedCase(text);
console.log(invertedCaseText); // Output: 'hELLO wORLD'
Converts a string to sponge case.
const text = 'Hello World';
const spongeCaseText = toSpongeCase(text);
console.log(spongeCaseText); // Output: 'hElLo wOrLd'
Converts a string to reverse case.
const text = 'Hello World';
const reverseCaseText = toReverseCase(text);
console.log(reverseCaseText); // Output: 'hELLO wORLD'
Converts a string to small caps.
const text = 'Hello World';
const smallCapsText = toSmallCaps(text);
console.log(smallCapsText); // Output: 'ʜᴇʟʟᴏ ᴡᴏʀʟᴅ'
Debounce Throttling 🕒 - Smooth out your application's performance by managing function calls with debouncing and throttling techniques.
LocalSafe 🔒 - Securely store sensitive data locally in the user's browser with encryption and other protective measures.
Online Status JS 🌐 - Keep track of your user's online status and enhance your application's real-time capabilities.
🌟 Made with ❤️ by Ashish
FAQs
text-tweak is your go-to toolkit for hassle-free string casing formatting in JavaScript/TypeScript. With a suite of intuitive functions, you can effortlessly convert text between various casing styles, whether it's lowercase, UPPERCASE, Title Case, camelC
The npm package text-tweak receives a total of 1 weekly downloads. As such, text-tweak popularity was classified as not popular.
We found that text-tweak demonstrated a healthy version release cadence and project activity because the last version was released less than 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.