{"id":17032933,"url":"https://github.com/up9cloud/node-simple-slugify","last_synced_at":"2026-02-09T17:31:16.476Z","repository":{"id":36973357,"uuid":"260754512","full_name":"up9cloud/node-simple-slugify","owner":"up9cloud","description":"Slugify a string, simply replace \"Reserved characters\", and \"Unsafe characters\" to \"-\"","archived":false,"fork":false,"pushed_at":"2023-02-27T05:57:42.000Z","size":341,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-02T04:37:44.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/up9cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-02T18:54:16.000Z","updated_at":"2022-02-13T22:22:55.000Z","dependencies_parsed_at":"2023-09-20T18:38:47.131Z","dependency_job_id":null,"html_url":"https://github.com/up9cloud/node-simple-slugify","commit_stats":null,"previous_names":["up9cloud/simple-slugify"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/up9cloud/node-simple-slugify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fnode-simple-slugify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fnode-simple-slugify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fnode-simple-slugify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fnode-simple-slugify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up9cloud","download_url":"https://codeload.github.com/up9cloud/node-simple-slugify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fnode-simple-slugify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29273656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T17:15:22.002Z","status":"ssl_error","status_checked_at":"2026-02-09T17:14:42.395Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:31:02.054Z","updated_at":"2026-02-09T17:31:16.430Z","avatar_url":"https://github.com/up9cloud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-slugify\n\n[![Build Status](https://travis-ci.org/up9cloud/simple-slugify.svg?branch=master)](https://travis-ci.org/up9cloud/simple-slugify)\n[![Coverage Status](https://coveralls.io/repos/github/up9cloud/simple-slugify/badge.svg?branch=master)](https://coveralls.io/github/up9cloud/simple-slugify?branch=master)\n\nSlugify a string, simply replace \"Reserved characters\", and \"Unsafe characters\" to \"-\".\n\n## Usage\n\n```js\nconst { slugify } = require('simple-slugify')\n\nslugify('I ♥') // i-♥\nslugify('大好き ♥', '_') // 大好き_♥\n```\n\n```html\n\u003c!-- browser side --\u003e\n\u003cscript src=\"https://unpkg.com/simple-slugify/dist/simple-slugify.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  console.log(simpleSlugify.slugify('I ♥')) // i-♥\n\u003c/script\u003e\n```\n\n## Api\n\n```js\nconst {\n  defaultOptions,\n  slugify,\n  Slugify\n} = require('simple-slugify')\n```\n\n### defaultOptions\n\n```js\nconsole.log(defaultOptions)\n// {\n//   lowercase: true,\n//   normalize: 'NFKC',\n//   replacement: '-',\n//   reserved: true,\n//   unsafe: true,\n//   trim: true,\n//   spaceLess: true,\n//   space: true\n// }\n```\n\n\u003e See details at `./src/index.js` `const defaultOptions`\n\n### slugify\n\n```ts\nslugify(source: string, [replacement: string | options: object]): string\n```\n\n```js\nslugify(' A?#  b ') // a---b\nslugify(' A?#  b ', '_') // a___b\nslugify(' A?#  b ', {\n  lowercase: false,\n  replacement: '_',\n  trim: false,\n  spaceLess: false,\n  space: '-'\n}) // -A__--b-\n```\n\n### Slugify\n\n```ts\nconst s = new Slugify\n\n// memorize slug, make sure the returning slug is unique\ns.slug(source: string, [replacement: string | options: object], [separator: string]): string\n\n// clear memory\ns.reset(): void\n```\n\n```js\nconst { Slugify } = require('simple-slugify')\nconst s = new Slugify\ns.slug('大好き ♥') // 大好き-♥\ns.slug('大好き ♥') // 大好き-♥.1\n\ns.reset()\ns.slug('大好き ♥') // 大好き-♥\ns.slug('大好き ♥', { space: false }, '_') // 大好き ♥\ns.slug('大好き ♥', { space: false }, '_') // 大好き ♥_1\ns.slug('大好き ♥_1', { space: false }, '_') // 大好き ♥_1_1\n```\n\n```html\n\u003c!-- browser side --\u003e\n\u003cscript src=\"https://unpkg.com/simple-slugify/dist/simple-slugify.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var s = new simpleSlugify.Slugify()\n  console.log(s.slug('I ♥')) // i-♥\n  console.log(s.slug('I ♥')) // i-♥.1\n\u003c/script\u003e\n```\n\n## Why\n\nThis lib focus on world wide human readable url, doesn't translate things to English. The non-english native people actually don't know too much English as programmers thought. So this lib converts characters only if necessary, only cover [reserved, unsafe characters](https://perishablepress.com/stop-using-unsafe-characters-in-urls/).\n\nIf you are looking for lib translating characters, please consider [https://github.com/simov/slugify](https://github.com/simov/slugify).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fnode-simple-slugify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup9cloud%2Fnode-simple-slugify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fnode-simple-slugify/lists"}