{"_id":"@depup/sindresorhus__slugify","_rev":"2-6af7d9bb9355bed84eca6576828c9cd9","name":"@depup/sindresorhus__slugify","dist-tags":{"latest":"3.0.1-depup.0"},"versions":{"3.0.0-depup.0":{"name":"@depup/sindresorhus__slugify","version":"3.0.0-depup.0","keywords":["depup","dependency-bumped","updated-deps","@sindresorhus/slugify","string","slugify","slug","url","url-safe","urlify","transliterate","transliteration","deburr","unicode","ascii","text","decamelize","pretty","clean","filename","id"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"@depup/sindresorhus__slugify@3.0.0-depup.0","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"homepage":"https://github.com/sindresorhus/slugify#readme","bugs":{"url":"https://github.com/sindresorhus/slugify/issues"},"xo":{"rules":{"@typescript-eslint/member-ordering":"off"}},"dist":{"shasum":"c9f4240116bab480656f686b278e593bdcee20dd","tarball":"https://registry.npmjs.org/@depup/sindresorhus__slugify/-/sindresorhus__slugify-3.0.0-depup.0.tgz","fileCount":7,"integrity":"sha512-gZZM05oTe3AXW/woVbivC2v7lMYNTKQVEeM+jnRWijwk24zAWscpcWD+yfxZJSd/OZMJ3tOoSSd2nqZ27A46QA==","signatures":[{"sig":"MEQCICssRHnqYmM166zCZcBfSOj59hJtkRjPpXjvKDS21+zOAiBbqxZBUG8EDBajQAQ0zHlGmdAcL+WqKUU9QsT1Fi2DqA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19013},"type":"module","depup":{"changes":{"@sindresorhus/transliterate":{"to":"^2.3.1","from":"^2.0.0"}},"smokeTest":"passed","depsUpdated":1,"processedAt":"2026-03-10T00:31:11.066Z","originalPackage":"@sindresorhus/slugify","originalVersion":"3.0.0"},"types":"./index.d.ts","engines":{"node":">=20"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"e599e8717613ef466c29ecbfdf6d654609237a16","scripts":{"test":"xo && ava"},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/slugify.git","type":"git"},"_npmVersion":"10.8.2","description":"[DepUp] Slugify a string","directories":{},"sideEffects":false,"_nodeVersion":"20.20.0","dependencies":{"escape-string-regexp":"^5.0.0","@sindresorhus/transliterate":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^1.2.2","ava":"^6.4.1"},"_npmOperationalInternal":{"tmp":"tmp/sindresorhus__slugify_3.0.0-depup.0_1773102673540_0.8615005929786153","host":"s3://npm-registry-packages-npm-production"}},"3.0.1-depup.0":{"name":"@depup/sindresorhus__slugify","version":"3.0.1-depup.0","description":"Slugify a string (with updated dependencies)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/slugify.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava"},"keywords":["@sindresorhus/slugify","depup","updated-dependencies","security","latest","patched","string","slugify","slug","url","url-safe","urlify","transliterate","transliteration","deburr","unicode","ascii","text","decamelize","pretty","clean","filename","id"],"dependencies":{"@sindresorhus/transliterate":"^2.3.1","escape-string-regexp":"^5.0.0"},"devDependencies":{"ava":"^6.4.1","xo":"^1.2.2"},"xo":{"rules":{"@typescript-eslint/member-ordering":"off"}},"depup":{"changes":{"@sindresorhus/transliterate":{"from":"^2.0.0","to":"^2.3.1"}},"depsUpdated":1,"originalPackage":"@sindresorhus/slugify","originalVersion":"3.0.1","processedAt":"2026-09-01T16:31:37.694Z","smokeTest":"passed"},"gitHead":"a33f19aea244da654ea814014ea96ce838884584","types":"./index.d.ts","_id":"@depup/sindresorhus__slugify@3.0.1-depup.0","bugs":{"url":"https://github.com/sindresorhus/slugify/issues"},"homepage":"https://github.com/sindresorhus/slugify#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-U6oIDEwnf7MH3suxppDttQ1VMih1oytOv+2UAUWUesLm9Ku4eSsvmKmWRGWO+9KTYRBTV2J254MhpUhxHNvnpA==","shasum":"90b28933783fd6a36b05d1023a9e413594ed7a56","tarball":"https://registry.npmjs.org/@depup/sindresorhus__slugify/-/sindresorhus__slugify-3.0.1-depup.0.tgz","fileCount":8,"unpackedSize":20754,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGs1WIaozVQS7m6qr+YbPUGpEdxXz3I2vC2odJQb9GMpAiBNsBXYTLpn0wfaPW+8XzdEm6EmZzYPYRai9NczkthHOg=="}]},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"directories":{},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sindresorhus__slugify_3.0.1-depup.0_1788280304154_0.28398857831598456"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T00:31:13.447Z","modified":"2026-09-01T16:31:44.477Z","3.0.0-depup.0":"2026-03-10T00:31:13.686Z","3.0.1-depup.0":"2026-09-01T16:31:44.292Z"},"bugs":{"url":"https://github.com/sindresorhus/slugify/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/slugify#readme","keywords":["@sindresorhus/slugify","depup","updated-dependencies","security","latest","patched","string","slugify","slug","url","url-safe","urlify","transliterate","transliteration","deburr","unicode","ascii","text","decamelize","pretty","clean","filename","id"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/slugify.git"},"description":"Slugify a string (with updated dependencies)","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"readme":"# slugify\n\n> Slugify a string\n\nUseful for URLs, filenames, and IDs.\n\nIt handles most major languages, including [German (umlauts)](https://en.wikipedia.org/wiki/Germanic_umlaut), Vietnamese, Arabic, Russian, [and more](https://github.com/sindresorhus/transliterate#supported-languages).\n\n## Install\n\n```sh\nnpm install @sindresorhus/slugify\n```\n\n## Usage\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('I ♥ Dogs');\n//=> 'i-love-dogs'\n\nslugify('  Déjà Vu!  ');\n//=> 'deja-vu'\n\nslugify('fooBar 123 $#%');\n//=> 'foo-bar-123'\n\nslugify('Conway’s Law');\n//=> 'conways-law'\n\nslugify('я люблю единорогов');\n//=> 'ya-lyublyu-edinorogov'\n```\n\n## API\n\n### slugify(string, options?)\n\n#### string\n\nType: `string`\n\nString to slugify.\n\n#### options\n\nType: `object`\n\n##### separator\n\nType: `string`\\\nDefault: `'-'`\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('BAR and baz');\n//=> 'bar-and-baz'\n\nslugify('BAR and baz', {separator: '_'});\n//=> 'bar_and_baz'\n\nslugify('BAR and baz', {separator: ''});\n//=> 'barandbaz'\n```\n\n##### lowercase\n\nType: `boolean`\\\nDefault: `true`\n\nMake the slug lowercase.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('Déjà Vu!');\n//=> 'deja-vu'\n\nslugify('Déjà Vu!', {lowercase: false});\n//=> 'Deja-Vu'\n```\n\n##### decamelize\n\nType: `boolean`\\\nDefault: `true`\n\nConvert camelcase to separate words. Internally it does `fooBar` → `foo bar`.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('fooBar');\n//=> 'foo-bar'\n\nslugify('fooBar', {decamelize: false});\n//=> 'foobar'\n```\n\n##### customReplacements\n\nType: `Array<string[]>`\\\nDefault: `[\n\t['&', ' and '],\n\t['🦄', ' unicorn '],\n\t['♥', ' love ']\n]`\n\nAdd your own custom replacements.\n\nThe replacements are run on the original string before any other transformations.\n\nThis only overrides a default replacement if you set an item with the same key, like `&`.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('Foo@unicorn', {\n\tcustomReplacements: [\n\t\t['@', 'at']\n\t]\n});\n//=> 'fooatunicorn'\n```\n\nAdd a leading and trailing space to the replacement to have it separated by dashes:\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('foo@unicorn', {\n\tcustomReplacements: [\n\t\t['@', ' at ']\n\t]\n});\n//=> 'foo-at-unicorn'\n```\n\nAnother example:\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('I love 🐶', {\n\tcustomReplacements: [\n\t\t['🐶', 'dogs']\n\t]\n});\n//=> 'i-love-dogs'\n```\n\n##### preserveLeadingUnderscore\n\nType: `boolean`\\\nDefault: `false`\n\nIf your string starts with an underscore, it will be preserved in the slugified string.\n\nSometimes leading underscores are intentional, for example, filenames representing hidden paths on a website.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('_foo_bar');\n//=> 'foo-bar'\n\nslugify('_foo_bar', {preserveLeadingUnderscore: true});\n//=> '_foo-bar'\n```\n\n##### preserveTrailingDash\n\nType: `boolean`\\\nDefault: `false`\n\nIf your string ends with a dash, it will be preserved in the slugified string.\n\nFor example, using slugify on an input field would allow for validation while not preventing the user from writing a slug.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('foo-bar-');\n//=> 'foo-bar'\n\nslugify('foo-bar-', {preserveTrailingDash: true});\n//=> 'foo-bar-'\n```\n\n##### preserveCharacters\n\nType: `string[]`\\\nDefault: `[]`\n\nPreserve certain characters.\n\nIt cannot contain the `separator`.\n\nThe apostrophe in a word-final `'s` or `'t` is still dropped, even if you preserve `'`.\n\nFor example, if you want to slugify URLs, but preserve the HTML fragment `#` character.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('foo_bar#baz', {preserveCharacters: ['#']});\n//=> 'foo-bar#baz'\n```\n\n##### locale\n\nType: `string`\\\nDefault: `undefined`\n\nThe locale to use for language-specific transliteration.\n\nSee the [`@sindresorhus/transliterate` package](https://github.com/sindresorhus/transliterate#locale) for more info.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('Räksmörgås');\n//=> 'raeksmoergas'\n\nslugify('Räksmörgås', {locale: 'sv'});\n//=> 'raksmorgas'\n```\n\n##### transliterate\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to transliterate Unicode characters to ASCII.\n\nWhen `false`, non-ASCII characters will be preserved instead of being transliterated. This can improve performance when you don't need transliteration.\n\n```js\nimport slugify from '@sindresorhus/slugify';\n\nslugify('Déjà Vu');\n//=> 'deja-vu'\n\nslugify('Déjà Vu', {transliterate: false});\n//=> 'déjà-vu'\n```\n\n### slugifyWithCounter()\n\nReturns a new instance of `slugify(string, options?)` with a counter to handle multiple occurrences of the same string.\n\n#### Example\n\n```js\nimport {slugifyWithCounter} from '@sindresorhus/slugify';\n\nconst slugify = slugifyWithCounter();\n\nslugify('foo bar');\n//=> 'foo-bar'\n\nslugify('foo bar');\n//=> 'foo-bar-2'\n\nslugify.reset();\n\nslugify('foo bar');\n//=> 'foo-bar'\n```\n\n#### Use-case example of counter\n\nIf, for example, you have a document with multiple sections where each subsection has an example.\n\n```md\n## Section 1\n\n### Example\n\n## Section 2\n\n### Example\n```\n\nYou can then use `slugifyWithCounter()` to generate unique HTML `id`'s to ensure anchors will link to the right headline.\n\n### slugify.reset()\n\nReset the counter\n\n#### Example\n\n```js\nimport {slugifyWithCounter} from '@sindresorhus/slugify';\n\nconst slugify = slugifyWithCounter();\n\nslugify('foo bar');\n//=> 'foo-bar'\n\nslugify('foo bar');\n//=> 'foo-bar-2'\n\nslugify.reset();\n\nslugify('foo bar');\n//=> 'foo-bar'\n```\n\n## Related\n\n- [slugify-cli](https://github.com/sindresorhus/slugify-cli) - CLI for this module\n- [transliterate](https://github.com/sindresorhus/transliterate) - Convert Unicode characters to Latin characters using transliteration\n- [filenamify](https://github.com/sindresorhus/filenamify) - Convert a string to a valid safe filename\n","readmeFilename":"readme.md"}