{"id":18824344,"url":"https://github.com/galassie/fslugify","last_synced_at":"2025-04-14T01:31:11.723Z","repository":{"id":43279045,"uuid":"213484033","full_name":"galassie/fslugify","owner":"galassie","description":"🐌 Minimalistic slug generator library","archived":false,"fork":false,"pushed_at":"2022-11-24T08:52:57.000Z","size":89,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T15:47:47.330Z","etag":null,"topics":["dotnet","fsharp","slug","slugify","url","web"],"latest_commit_sha":null,"homepage":"","language":"F#","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/galassie.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}},"created_at":"2019-10-07T20:49:42.000Z","updated_at":"2023-01-28T16:43:38.000Z","dependencies_parsed_at":"2023-01-23T00:30:08.169Z","dependency_job_id":null,"html_url":"https://github.com/galassie/fslugify","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galassie%2Ffslugify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galassie%2Ffslugify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galassie%2Ffslugify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galassie%2Ffslugify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galassie","download_url":"https://codeload.github.com/galassie/fslugify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248807499,"owners_count":21164694,"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":["dotnet","fsharp","slug","slugify","url","web"],"created_at":"2024-11-08T00:56:14.172Z","updated_at":"2025-04-14T01:31:11.394Z","avatar_url":"https://github.com/galassie.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FSlugify\n\n[![Build status](https://ci.appveyor.com/api/projects/status/7xa66bc8a9ruw5wm?svg=true)](https://ci.appveyor.com/project/galassie/fslugify) [![NuGet](https://img.shields.io/nuget/v/FSlugify.svg)](https://nuget.org/packages/FSlugify)\n\nSimple and minimalistic slug generator library written entirely in F#.\n\nIt's easy to use and has no extra dependencies.\n\n## Add package\n\nIf you want to add this package to your project, execute the following command:\n\n``` shell\ndotnet add package FSlugify\n```\n\n## Build on your machine\n\nIf you want to build this library on your machine, execute the following commands:\n\n``` shell\ngit clone https://github.com/galassie/fslugify.git\ncd fslugify\ndotnet build\n```\n\nIf you want to run the tests, execute the following command:\n\n``` shell\ndotnet test\n```\n\n## Build in Docker\n\nRequired:\n- Install [Docker](https://hub.docker.com/search/?type=edition\u0026offering=community) for your system\n\nBuild a Docker image called `fslugify`. This will work without any local .NET Core installation.\n\n```shell\ndocker build -t fslugify .\n```\n\nUse the following to instantiate a Docker container from the `fslugify` image and run the tests inside:\n\n```shell\ndocker run --rm fslugify dotnet test\n```\n\n## Usage\n\nYou can see the some examples in the folder \"samples\" (both in C# and F#).\n\nHere how it looks a simple F# program that uses this library:\n\n``` fsharp\nopen FSlugify.SlugGenerator\n\n[\u003cEntryPoint\u003e]\nlet main argv =\n    printfn \"This is a series of examples on how to use the SlugGenerator!\\n\"\n\n    slugify DefaultSlugGeneratorOptions \"Déjà Vu!\"\n    |\u003e printfn \"Slug generated from \\\"Déjà Vu!\\\" with default options: \\\"%s\\\"\\n\"\n\n    slugify { DefaultSlugGeneratorOptions with Separator = '#' } \"Déjà Vu!\"\n    |\u003e printfn \"Slug generated from \\\"Déjà Vu!\\\" with custom separator: \\\"%s\\\"\\n\"\n    \n    slugify { DefaultSlugGeneratorOptions with Lowercase = false } \"Déjà Vu!\"\n    |\u003e printfn \"Slug generated from \\\"Déjà Vu!\\\" without lowercase: \\\"%s\\\"\\n\"\n    \n    let customMap = [(\"|\", \" or \"); (\"🤡\", \" clown \")]\n    slugify { DefaultSlugGeneratorOptions with CustomMap = customMap } \"Test | 🤡\"\n    |\u003e printfn \"Slug generated from \\\"Test | 🤡\\\" with custom map: \\\"%s\\\"\\n\"\n    0\n\n```\nThis program will output the following text:\n\n``` shell\nThis is a series of examples on how to use the SlugGenerator!\n\nSlug generated from \"Déjà Vu!\" with default options: \"deja_vu\"\n\nSlug generated from \"Déjà Vu!\" with custom separator: \"deja#vu\"\n\nSlug generated from \"Déjà Vu!\" without lowercase: \"Deja_Vu\"\n\nSlug generated from \"Test | 🤡\" with custom map: \"test_or_clown\"\n\n```\n\n## Slug Custom Computation Expression\n\nIt is possible to use the custom Computation Expression in order to define your custom slugify function.\n\nHere a simple example:\n\n``` fsharp\nopen FSlugify.Builder\n\n[\u003cEntryPoint\u003e]\nlet main argv =\n    printfn \"This example shows how to use the custom Slug Computation Expression!\\n\"\n\n    let customSlugify = slug {\n            separator '@'\n            lowercase false\n            custom_map (\"|\", \" or \")\n            custom_map (\"\u0026\", \" and \")\n            custom_map (\"⏳\", \" hourglass \")\n            custom_map (\"🤡\", \" clown\")\n        }\n\n    customSlugify \"Test | Case\"\n    |\u003e printfn \"Slug generated from \\\"Test | Case\\\": \\\"%s\\\"\\n\"\n\n    customSlugify \" Test  \u0026  ⏳ \"\n    |\u003e printfn \"Slug generated from \\\"  Test  \u0026  ⏳  \\\": \\\"%s\\\"\\n\"\n\n    customSlugify \"HI 🤡!!!\"\n    |\u003e printfn \"Slug generated from \\\"HI 🤡!!!\\\": \\\"%s\\\"\\n\"\n    0\n\n```\nThis program will output the following text:\n\n``` shell\nThis example shows how to use the custom Slug Computation Expression!\n\nSlug generated from \"Test | Case\": \"Test@or@Case\"\n\nSlug generated from \"  Test  \u0026  ⏳  \": \"Test@and@hourglass\"\n\nSlug generated from \"HI 🤡!!!\": \"HI@clown\"\n\n```\n\n## FSlugify.Adapter\n\nAlthough the library is usable as it is in a C# project (as it shown in the C# sample), for a better usability (both in syntax and usability) it's preferred to use the library [FSlugify.Adapter](https://github.com/galassie/fslugify-adapter). \n\n## Contributing\n\nCode contributions are more than welcome! 😻\n\nPlease commit any pull requests against the `master` branch.  \nIf you find any issue, please [report it](https://github.com/galassie/fslugify/issues)!\n\n## License\n\nThis project is licensed under [The MIT License (MIT)](https://raw.githubusercontent.com/galassie/fslugify/master/LICENSE.md).\n\nAuthor: [Enrico Galassi](https://twitter.com/enricogalassi88)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalassie%2Ffslugify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgalassie%2Ffslugify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalassie%2Ffslugify/lists"}