
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@developaul/string-utils
Advanced tools
A comprehensive string manipulation utility library built with TypeScript for modern JavaScript applications.
npm install @developaul/string-utils
# or
pnpm add @developaul/string-utils
# or
yarn add @developaul/string-utils
import { kebabCase, capitalize, isEmail } from '@developaul/string-utils';
// Format strings
const slug = kebabCase('Hello World'); // 'hello-world'
const title = capitalize('hello world'); // 'Hello world'
// Validate strings
const valid = isEmail('test@example.com'); // true
import { formatters, validators } from '@developaul/string-utils';
// Use formatters
const slug = formatters.slugify('Hello World!'); // 'hello-world'
const camel = formatters.camelCase('hello-world'); // 'helloWorld'
// Use validators
const isValidEmail = validators.isEmail('test@example.com'); // true
const hasLength = validators.hasMinLength('hello', 3); // true
// Import only formatters
import { kebabCase, titleCase } from '@developaul/string-utils/formatters';
// Import only validators
import { isEmail, isUrl } from '@developaul/string-utils/validators';
kebabCase(str: string): stringConvert a string to kebab-case.
kebabCase('Hello World') // 'hello-world'
kebabCase('camelCase') // 'camel-case'
camelCase(str: string): stringConvert a string to camelCase.
camelCase('hello-world') // 'helloWorld'
camelCase('snake_case') // 'snakeCase'
capitalize(str: string): stringCapitalize the first letter of a string.
capitalize('hello world') // 'Hello world'
titleCase(str: string): stringConvert a string to Title Case.
titleCase('hello world') // 'Hello World'
titleCase('the quick brown fox') // 'The Quick Brown Fox'
slugify(str: string): stringCreate a URL-friendly slug from a string.
slugify('Hello World!') // 'hello-world'
slugify('The Quick Brown Fox') // 'the-quick-brown-fox'
truncate(str: string, length: number, suffix?: string): stringTruncate a string to a specified length.
truncate('Hello World', 5) // 'Hello...'
truncate('Hello World', 5, '!') // 'Hello!'
isEmail(str: string): booleanCheck if a string is a valid email address.
isEmail('test@example.com') // true
isEmail('invalid-email') // false
isUrl(str: string): booleanCheck if a string is a valid URL.
isUrl('https://example.com') // true
isUrl('not-a-url') // false
isAlphanumeric(str: string): booleanCheck if a string contains only alphanumeric characters.
isAlphanumeric('abc123') // true
isAlphanumeric('abc-123') // false
isEmpty(str: string): booleanCheck if a string is empty or contains only whitespace.
isEmpty('') // true
isEmpty(' ') // true
isEmpty('hello') // false
hasMinLength(str: string, minLength: number): booleanCheck if a string has a minimum length.
hasMinLength('hello', 3) // true
hasMinLength('hi', 3) // false
matchesPattern(str: string, pattern: RegExp): booleanCheck if a string matches a pattern.
matchesPattern('123', /^\d+$/) // true
matchesPattern('abc', /^\d+$/) // false
This package follows Semantic Versioning.
Current version: 0.1.0-alpha.0
This package is part of the @breaking monorepo for learning package publishing workflows.
MIT License - see LICENSE file for details.
FAQs
A comprehensive string manipulation utility library
The npm package @developaul/string-utils receives a total of 3 weekly downloads. As such, @developaul/string-utils popularity was classified as not popular.
We found that @developaul/string-utils 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.