webslug
Version, currently master branch1 version
- master branchlatestOct 13, 2021
github.com/crab-cr/webslug
slug string optimized for pretty urls
5 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
webslug:
github: crab-cr/webslug
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.34.0- License
- MIT
- Author
- iomcr
Dependencies
This version declares no dependencies.
README
webslug
inspired by "slug" from npm, but optimized for my slugs use case. Requests for more slug examples are welcome!
Installation
-
Add the dependency to your
shard.yml:dependencies: webslug: github: iomcr/webslug -
Run
shards install
Usage
require "webslug"
Iom::WebSlug.slug("i ♥ unicode").should eq "i-love-unicode"
Iom::WebSlug.slug("I ♥ UNICODE").should eq "i-love-unicode"
Iom::WebSlug.slug("i <3 unicode").should eq "i-love-unicode"
Iom::WebSlug.slug("компютъра").should eq "kompyutura"
Iom::WebSlug.slug("unicode ♥ is ☢").should eq "unicode-love-is-radioactive"
Iom::WebSlug.slug("http://www.example.com").should eq "www-example-com"
Iom::WebSlug.slug("Schlotsky's").should eq "schlotskys"
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/iomcr/webslug/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Iomcr - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Oct 13, 2021
- Crystal
0.34.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/crab-cr/webslug
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 13, 2026
- Versions
- 1