Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/segment-boneyard/slug
The slugging function we use for Segment projects, usernames, etc.
https://github.com/segment-boneyard/slug
Last synced: about 5 hours ago
JSON representation
The slugging function we use for Segment projects, usernames, etc.
- Host: GitHub
- URL: https://github.com/segment-boneyard/slug
- Owner: segment-boneyard
- Created: 2013-12-09T19:12:26.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-09T19:12:39.000Z (almost 11 years ago)
- Last Synced: 2024-04-09T16:31:14.663Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 719 KB
- Stars: 10
- Watchers: 40
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# slug
The slugging function we use for Segment.io projects, usernames, etc.
## Installation
$ component install segmentio/slug
## Example
```js
var slug = require('slug');slug('Pets.com'); // "pets.com"
slug('American Airlines'); // "american-airlines"
slug('@mention'); // "mention"
```## API
### slug(string)
Convert the given `string` to a slug.## License
MIT