@stacksjs/strings
TypeScript icon, indicating that this package has built-in type declarations

0.61.18 • Public • Published

Stacks Strings

Easily manipulate & work with strings.

☘️ Features

  • Easily manipulate strings
  • Powerful & fast API

🤖 Usage

bun install -d @stacksjs/strings

Now, you can use it in your project:

import {
  // pluralize
  addIrregularRule,
  addPluralRule,
  addSingularRule,
  addUncountableRule,
  isPlural,
  isSingular,
  singular,
  plural,

  // case
  camelCase,
  capitalCase,
  constantCase,
  dotCase,
  headerCase,
  kebabCase,
  noCase,
  paramCase,
  pascalCase,
  pathCase,
  sentenceCase,
  snakeCase,
  titleCase,

  // validation
  isEmail,
  isStrongPassword,
  isAlphanumeric,
  validateUsername,
  isURL,
  isMobilePhone,
  isAlpha,
  isPostalCode,
  isDate,
  isNumeric,
  isBoolean,
  isHexColor,
  isHexadecimal,
  isBase64,
  isUUID,
  isJSON,
  isCreditCard,
  isISBN,
  isIP,
  isIPRange,
  isMACAddress,
  isLatLong,
  isLatitude,
  isLongitude,
  isCurrency,
  isDataURI,
  isMimeType,
  isJWT,
  isMongoId,
  isAscii,
  isBase32,
  isByteLength,
  isFQDN,
  isFullWidth,
  isHalfWidth,
  isHash,
  isHSL,
  isIBAN,
  isIdentityCard,
  isISIN,
  isISO8601,
  isISRC,
  isISSN,
  isISO31661Alpha2,
  isISO31661Alpha3
} from '@stacksjs/strings'

console.log(camelCase('hello world')) // => "helloWorld"
console.log(plural('dog')) // => "dogs"

To view the full documentation, please visit https://stacksjs.org/strings.

🧪 Testing

bun test

📈 Changelog

Please see our releases page for more information on what has changed recently.

🚜 Contributing

Please review the Contributing Guide for details.

🏝 Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discussions on GitHub

For casual chit-chat with others using this package:

Join the Stacks Discord Server

🙏🏼 Credits

Many thanks to the following core technologies & people who have contributed to this package:

📄 License

The MIT License (MIT). Please see LICENSE for more information.

Made with 💙

Package Sidebar

Install

npm i @stacksjs/strings

Weekly Downloads

4,851

Version

0.61.18

License

MIT

Unpacked Size

22.7 kB

Total Files

12

Last publish

Collaborators

  • chrisbreuer