Gathering detailed insights and metrics for text-tweak
Gathering detailed insights and metrics for text-tweak
Gathering detailed insights and metrics for text-tweak
Gathering detailed insights and metrics for text-tweak
npm install text-tweak
Typescript
Module System
Node Version
NPM Version
Updated on 03 Jun 2024
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
Compared to previous day
Last week
25%
Compared to previous week
Last month
29.6%
Compared to previous month
Last year
0%
Compared to previous year
3
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:
1npm install text-tweak
To use the functions provided by the text-tweak
package, follow these steps:
text-tweak
package:1import { 2 toLowerCase, 3 toUpperCase, 4 toTitleCase, 5 toSentenceCase, 6 toCamelCase, 7 toSnakeCase, 8 toKebabCase, 9 toPascalCase, 10 toConstantCase, 11 toDotCase, 12 toPathCase, 13 toAlternatingCase, 14 toInvertedCase, 15 toSpongeCase, 16 toReverseCase, 17 toSmallCaps 18} from 'text-tweak'; 19
Converts a string to lowercase.
1const text = 'Hello World'; 2const lowerCaseText = toLowerCase(text); 3console.log(lowerCaseText); // Output: 'hello world'
Converts a string to uppercase.
1const text = 'Hello World'; 2const upperCaseText = toUpperCase(text); 3console.log(upperCaseText); // Output: 'HELLO WORLD'
Converts a string to camel case.
1const text = 'hello world'; 2const camelCaseText = toCamelCase(text); 3console.log(camelCaseText); // Output: 'Hello World'
Converts a string to camel case.
1const text = 'hello world'; 2const camelCaseText = toCamelCase(text); 3console.log(camelCaseText); // Output: 'Hello world'
Converts a string to camel case.
1const text = 'hello world'; 2const camelCaseText = toCamelCase(text); 3console.log(camelCaseText); // Output: 'helloWorld'
Converts a string to kebab case.
1const text = 'Hello World'; 2const kebabCaseText = toKebabCase(text); 3console.log(kebabCaseText); // Output: 'hello-world'
Converts a string to Pascal case.
1const text = 'hello world'; 2const pascalCaseText = toPascalCase(text); 3console.log(pascalCaseText); // Output: 'HelloWorld'
Converts a string to constant case.
1const text = 'Hello World'; 2const constantCaseText = toConstantCase(text); 3console.log(constantCaseText); // Output: 'HELLO_WORLD'
Converts a string to dot case.
1const text = 'Hello World'; 2const dotCaseText = toDotCase(text); 3console.log(dotCaseText); // Output: 'hello.world'
Converts a string to path case.
1const text = 'Hello World'; 2const pathCaseText = toPathCase(text); 3console.log(pathCaseText); // Output: 'hello/world'
Converts a string to alternating case.
1const text = 'Hello World'; 2const alternatingCaseText = toAlternatingCase(text); 3console.log(alternatingCaseText); // Output: 'HeLlO wOrLd'
Converts a string to inverted case.
1const text = 'Hello World'; 2const invertedCaseText = toInvertedCase(text); 3console.log(invertedCaseText); // Output: 'hELLO wORLD'
Converts a string to sponge case.
1const text = 'Hello World'; 2const spongeCaseText = toSpongeCase(text); 3console.log(spongeCaseText); // Output: 'hElLo wOrLd'
Converts a string to reverse case.
1const text = 'Hello World'; 2const reverseCaseText = toReverseCase(text); 3console.log(reverseCaseText); // Output: 'hELLO wORLD'
Converts a string to small caps.
1const text = 'Hello World'; 2const smallCapsText = toSmallCaps(text); 3console.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
No vulnerabilities found.
No security vulnerabilities found.