{"repo":"sindresorhus/slugify","free":true,"listed":false,"github":"https://github.com/sindresorhus/slugify","clone":"git clone https://github.com/sindresorhus/slugify.git","description":"Slugify a string","language":"JavaScript","stars":2702,"topics":["slugify","slug","url-safe","transliteration","nodejs","browser","npm-package"],"license":"MIT","category":"dev-tools","readme_excerpt":"slugify Slugify a string Useful for URLs, filenames, and IDs. It handles most major languages, including German (umlauts), Vietnamese, Arabic, Russian, and more. Install Usage API slugify(string, options?) string Type: string String to slugify. options Type: object separator Type: string \\ Default: '-' lowercase Type: boolean \\ Default: true Make the slug lowercase. decamelize Type: boolean \\ Default: true Convert camelcase to separate words. Internally it does fooBar → foo bar . customReplacements Type: Array \\ Default: [ ['&', ' and '], ['🦄', ' unicorn '], ['♥', ' love '] ] Add your own custom replacements. The replacements are run on the original string before any other transformations. This only overrides a default replacement if you set an item with the same key, like & . Add a leading and trailing space to the replacement to have it separated by dashes: Another example: preserveLeadingUnderscore Type: boolean \\ Default: false If your string starts with an underscore, it will be preserved in the slugified string. Sometimes leading underscores are intentional, for example, filenames representing hidden paths on a website. preserveTrailingDash Type: boolean \\ Default: false If your string ends with a dash, it will be preserved in the slugified string. For example, using slugify on an input field would allow for validation while not preventing the user from writing a slug. preserveCharacters Type: string[] \\ Default: [] Preserve certain characters. It cannot contain the se","default_branch":null,"files":null,"tree":[],"storefront":"/r/sindresorhus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sindresorhus/slugify/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}