{"id":29167224,"url":"https://github.com/palmabit-it/loopback-ds-slugify-mixin","last_synced_at":"2025-10-03T17:14:21.481Z","repository":{"id":33152355,"uuid":"137916742","full_name":"Palmabit-IT/loopback-ds-slugify-mixin","owner":"Palmabit-IT","description":"Loopback Slugify Mixin","archived":false,"fork":false,"pushed_at":"2022-02-11T00:24:09.000Z","size":23,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-26T21:10:14.507Z","etag":null,"topics":["loopback","mixin","mixins","nodejs","slug","slugify"],"latest_commit_sha":null,"homepage":"","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/Palmabit-IT.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-19T16:20:15.000Z","updated_at":"2019-11-06T21:44:31.000Z","dependencies_parsed_at":"2022-08-07T20:01:14.287Z","dependency_job_id":null,"html_url":"https://github.com/Palmabit-IT/loopback-ds-slugify-mixin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Palmabit-IT/loopback-ds-slugify-mixin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Palmabit-IT%2Floopback-ds-slugify-mixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Palmabit-IT%2Floopback-ds-slugify-mixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Palmabit-IT%2Floopback-ds-slugify-mixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Palmabit-IT%2Floopback-ds-slugify-mixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Palmabit-IT","download_url":"https://codeload.github.com/Palmabit-IT/loopback-ds-slugify-mixin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Palmabit-IT%2Floopback-ds-slugify-mixin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933327,"owners_count":23386785,"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":["loopback","mixin","mixins","nodejs","slug","slugify"],"created_at":"2025-07-01T09:08:33.193Z","updated_at":"2025-10-03T17:14:21.403Z","avatar_url":"https://github.com/Palmabit-IT.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"loopback-ds-slugify-mixin\n=============\n\n# Install\n\n```bash\n  npm i @palmabit/loopback-ds-slugify-mixin --save\n```\n\n# Server Config\n\nAdd the `mixins` property to your `server/model-config.json`:\n\n```json\n{\n  \"_meta\": {\n    \"sources\": [\n      \"loopback/common/models\",\n      \"loopback/server/models\",\n      \"../common/models\",\n      \"./models\"\n    ],\n    \"mixins\": [\n      \"loopback/common/mixins\",\n      \"../node_modules/@palmabit/loopback-ds-slugify-mixin\",\n      \"../common/mixins\"\n    ]\n  }\n}\n```\n\n# Model Config\n\nTo use with your Models add the `mixins` attribute to the definition object of your model config.\n\n```json\n  {\n    \"name\": \"Widget\",\n    \"properties\": {\n      \"name\": {\n        \"type\": \"string\",\n      }\n    },\n    \"mixins\": {\n    \"Slugify\": {\n      \"slugifyOptions\": { \n        \"replacement\": \"=\",\n        \"remove\": null,\n        \"lower\": true,\n        \"suffixTimestamp\": true\n      },\n      \"slugifiedField\": \"slug\",\n      \"fieldToSlugify\": \"name\"\n    }\n  }\n  }\n```\n\n- **slugifyOptions**: Optional. See https://github.com/simov/slugify for more infos\n- **slugifiedField**: [String] Optional. Default is \"slug\". Support dot notation (ex. \"foo.bar\") for nested\n- **fieldToSlugify**: [String] Required. Support dot notation (ex. \"foo.bar\") for nested\n- **suffixTimestamp**: [Boolean] Optional\n\n# Changelog\n\n[Changelog File](CHANGELOG.md)\n\n# License\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalmabit-it%2Floopback-ds-slugify-mixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalmabit-it%2Floopback-ds-slugify-mixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalmabit-it%2Floopback-ds-slugify-mixin/lists"}