{"_id":"@apostrophecms/sluggo-stable","name":"@apostrophecms/sluggo-stable","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@apostrophecms/sluggo-stable","version":"1.0.0","description":"High-speed, unicode-aware, browser-friendly slug generator","main":"sluggo.js","scripts":{"test":"mocha test/test.js"},"repository":{"type":"git","url":"git+https://github.com/apostrophecms/apostrophe.git","directory":"packages/sluggo"},"homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/sluggo#readme","keywords":["slug","unicode","slugs"],"author":{"name":"Apostrophe Technologies, Inc."},"license":"MIT","bugs":{"url":"https://github.com/apostrophecms/sluggo/issues"},"devDependencies":{"mocha":"^11.7.5"},"apostropheTestConfig":{"requiresMongo":false},"gitHead":"b3e29f004f514041e1e389293ae67017c60d006e","_id":"@apostrophecms/sluggo-stable@1.0.0","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-vBdvYW2QR4RFg1hwv1Ra/nup330eLnE3shhkSKjJEew9fzdW6UnGeKOHfPnLzXsFABZiXAWHgsKVPW/RIBxBBw==","shasum":"d970aafe726fc2205a080dd0e8263e8ea144cfa2","tarball":"https://registry.npmjs.org/@apostrophecms/sluggo-stable/-/sluggo-stable-1.0.0.tgz","fileCount":6,"unpackedSize":18915,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCzY1uCa7Nzr8Hoc9mTALNnZHbaeT2p5knb6tclbgTaZwIgLAXj58XLUhAXCf/Un9boWL4G0c7qk5m7Fc2mo2ruZuA="}]},"_npmUser":{"name":"boutell","email":"tom@apostrophecms.com"},"directories":{},"maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sluggo-stable_1.0.0_1781112745336_0.1793769336188742"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T17:32:25.115Z","1.0.0":"2026-06-10T17:32:25.517Z","modified":"2026-06-10T17:32:25.918Z"},"maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"description":"High-speed, unicode-aware, browser-friendly slug generator","homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/sluggo#readme","keywords":["slug","unicode","slugs"],"repository":{"type":"git","url":"git+https://github.com/apostrophecms/apostrophe.git","directory":"packages/sluggo"},"author":{"name":"Apostrophe Technologies, Inc."},"bugs":{"url":"https://github.com/apostrophecms/sluggo/issues"},"license":"MIT","readme":"# sluggo\n\n<a href=\"https://apostrophecms.com/\"><img src=\"https://raw.githubusercontent.com/apostrophecms/sanitize-html/main/logos/logo-box-madefor.png\" align=\"right\" alt=\"Made for ApostropheCMS\"/></a>\n\nsluggo is a slug generator that:\n\n* Understands Unicode\n* Runs fast (much, much faster than a RegExp solution)\n* Replaces all runs of punctuation (in any language), control characters, whitespace, etc. with single dashes, with no leading or trailing dashes\n* Allows you to let one punctuation character through if you wish, such as a slash for pathnames\n* Allows you to change the separator character\n* Is small enough to include in your browser javascript (<10K), even with the Unicode data\n\n## Installation\n\n```bash\nnpm install sluggo\n```\n\n## Usage\n\n```javascript\nvar sluggo = require('sluggo');\n\nvar s = sluggo('@ monkey\\'s are elab؉؉orate fools##');\nconsole.log(s);\n```\n\nOutputs:\n\n```\nmonkey-s-are-elab-orate-fools\n```\n\n## Options\n\n### separator\n\nChange the string separator by passing a string (usually one character) to `separator`.\n\n```javascript\nconst sluggo = require('sluggo');\n\nconst s = sluggo('monkey\\'s are elaborate fools', {\n  separator: ','\n});\nconsole.log(s);\n```\n\nOutputs:\n\n```\nmonkey,s,are,elaborate,fools\n```\n\n### allow\n\nSet a single-character string to allow in returned strings. Otherwise all punctuation characters are replaced by the separator.\n\n```javascript\nconst sluggo = require('sluggo');\n\nconst s = sluggo('@ monkey\\'s are elab؉؉orate fools##', {\n  allow: '؉'\n});\nconsole.log(s);\n```\n\nOutputs:\n\n```\nmonkey-s-are-elab؉؉orate-fools\n```\n\n## In the Browser\n\nYou just want `sluggo.js`. Add that file to your frontend javascript world.\n\nNow you can call the `sluggo()` function anywhere.\n\nYou do NOT need `generator.js`, which we will use when the next version of Unicode comes out to update this module.\n\n## About ApostropheCMS\n\nsluggo was created at [P'unk Avenue](https://punkave.com) for use in [ApostropheCMS](https://apostrophecms.com), an open-source content management system built on Node.js. If you like sanitize-html you should definitely check out Apostrophe.\n\n## Support\n\nFeel free to [open issues on Github](http://github.com/apostrophecms/sluggo/issues).\n\n## Changelog\n\n### 1.0.0 - 2023-05-03\n- Accepts an array of exceptions in the `allow` options property while still accepting a string. Declared stable.\n\n### 0.3.1 - 2021-04-23\n- Accepts the empty string as a legitimate value for `def`, as was always intended, rather than forcing `none` in that situation. If `def` is not set at all `none` is still the fallback default.\n\n### 0.3.0 - 2020-01-27\n- Updates package.json with new metadata\n- Updates README.\n\n### 0.2.0\n\nWhoops, the classic apostrophe slugify method accepted `allow`, not `allowed`. We just released this today, so I've switched to `allow` in `sluggo` as well. However I did bump to 0.2.0 to remain faithful to the semver standard.\n\n### 0.1.2\n\nConverts to lowercase properly.\n\n### 0.1.1\n\nPackaged correctly to work in either node or the browser.\n\n### 0.1.0\n\nInitial release.\n","readmeFilename":"README.md","_rev":"1-3e6bb710d6f649739f6666a56f642f1c"}