back to projects
str

🌍 A JavaScript string manipulation library. CJS & ESM compatible.

npm i -S str
npm i -S str
const slugify = require('str/slugify')
import slugify from 'str/slugify'
slugify('mAnElEt') // manelet

Your swiss knife for strings

🛠 A complete set of functions for string manipulation that will cover your needs both in back and frontend.

⚡️ Lightweight, just 483 bytes

✌️ Both CJS & ESM compatible.

🚧

wip

🚧

Methods

  • slugify
    slugify("I'm Manel", delimeter = '-') // im-manel
  • camelcase
    camelcase("I'm Manel") // imManel
  • startsWidth
    startsWidth("I'm Manel", "I") // true
  • endsWith
    endsWith("I'm Manel", "el") // true
  • upper
    upper("I'm Manel") // I'M MANEL
  • lower
    lower("I'm Manel") // i'm manel
  • And many more! Feel free to add yours 😚

Made with 💖 in Barcelona