{"id":24556122,"url":"https://github.com/mattchewone/feathers-slugify","last_synced_at":"2025-04-16T21:44:03.378Z","repository":{"id":57234112,"uuid":"105759782","full_name":"Mattchewone/feathers-slugify","owner":"Mattchewone","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-19T06:16:15.000Z","size":90,"stargazers_count":3,"open_issues_count":9,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T05:41:37.022Z","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/Mattchewone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-04T11:18:56.000Z","updated_at":"2022-03-04T20:59:04.000Z","dependencies_parsed_at":"2024-06-21T15:34:14.244Z","dependency_job_id":"ca48be9a-b3c1-428b-aae5-f49187e0a095","html_url":"https://github.com/Mattchewone/feathers-slugify","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"0f33fa7e2936c1d0d53e92abdb133aa3cb807cc9"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mattchewone%2Ffeathers-slugify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mattchewone%2Ffeathers-slugify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mattchewone%2Ffeathers-slugify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mattchewone%2Ffeathers-slugify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mattchewone","download_url":"https://codeload.github.com/Mattchewone/feathers-slugify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249280535,"owners_count":21243138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-01-23T04:38:36.833Z","updated_at":"2025-04-16T21:44:03.360Z","avatar_url":"https://github.com/Mattchewone.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# feathers-slugify\n\n[![Download Status](https://img.shields.io/npm/dm/feathers-slugify.svg?style=flat-square)](https://www.npmjs.com/package/feathers-slugify)\n\n\u003e Feathers hook to slugify properties\n\n**Only tested with FeathersJS V3**\n\n## Installation\n\n```\nnpm install feathers-slugify --save\n```\n\n\n## Single Rule w/single property\n```js\nconst slugify = require('feathers-slugify')\n\nmodule.exports = {\n  before: {\n    all: [],\n    find: [],\n    get: [],\n    create: [\n      slugify({ slug: 'name' })\n    ]\n  }\n}\n\n// With data for create\nconst data = {\n  name: 'Dave Smith'\n}\n// Will become\nconst data = {\n  name: 'Dave Smith',\n  slug: 'dave-smith'\n}\n```\n\n## Single Rule w/multiple properties\n```js\nconst slugify = require('feathers-slugify')\n\nmodule.exports = {\n  before: {\n    all: [],\n    find: [],\n    get: [],\n    create: [\n      slugify({ slug: ['meta.firstname', 'meta.surname'] })\n    ]\n  }\n}\n\n// With data for create\nconst data = {\n  meta: {\n    firstname: 'Dave',\n    surname: 'Smith'\n  }\n}\n// Will become\nconst data = {\n  meta: {\n    firstname: 'Dave',\n    surname: 'Smith'\n  },\n  slug: 'dave-smith'\n}\n```\n\n## Multiple Rules\n```js\nconst slugify = require('feathers-slugify')\n\nmodule.exports = {\n  before: {\n    all: [],\n    find: [],\n    get: [],\n    create: [\n      slugify([\n        {\n          source: ['name.first', 'name.last'],\n          dest: 'fullname',\n          overwrite: true // defaults to false\n        },\n        {\n          source: 'title',\n          dest: 'titleSlug'\n        }\n      ])\n    ]\n  }\n}\n\n// With data for create\nconst data = {\n  name: {\n    first: 'John',\n    last: 'Smith'\n  },\n  title: 'My Awesome Title'\n}\n// Will become\nconst data = {\n  name: {\n    first: 'John',\n    last: 'Smith'\n  },\n  fullname: 'john-smith',\n  title: 'My Awesome Title',\n  titleSlug: 'my-awesome-title'\n}\n```\n\n## Notes\nThis package uses the [url-slug](https://www.npmjs.com/package/url-slug) package to **_slugify_**.\n```\nRFC 3986 compliant slug generator with support for multiple languages. It creates safe slugs for use in urls—and can revert them.\n```\n\n## License\n\nCopyright (c) 2017\n\nLicensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattchewone%2Ffeathers-slugify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattchewone%2Ffeathers-slugify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattchewone%2Ffeathers-slugify/lists"}