Comparing version 8.0.0 to 8.1.0
@@ -0,1 +1,8 @@ | ||
# [8.1.0](https://github.com/Trott/slug/compare/v8.0.0...v8.1.0) (2022-10-02) | ||
### Features | ||
* add a (painfully minimal) web playground ([#350](https://github.com/Trott/slug/issues/350)) ([4e1aa40](https://github.com/Trott/slug/commit/4e1aa408032e36c59b906464da43888972cc9037)) | ||
# [8.0.0](https://github.com/Trott/slug/compare/v7.0.0...v8.0.0) (2022-08-31) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "slug", | ||
"description": "slugifies even utf-8 chars!", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"homepage": "https://github.com/Trott/slug", | ||
@@ -6,0 +6,0 @@ "author": "dodo (https://github.com/dodo)", |
@@ -21,17 +21,2 @@ # [slug](https://github.com/Trott/slug) | ||
## Differences between `slug` and `slugify` packages | ||
Here are some key differences between this package and [`slugify`](https://github.com/simov/slugify). | ||
- **Defaults:** `slug` has the `lower` option enabled by default, lowercasing all slugs | ||
(`'On SALE'` becomes `'on-sale'`). | ||
`slugify` has the `lower` option disabled by default (`'On SALE'` becomes `'On-SALE'`). | ||
- **Symbols:** `slug` removes unrecognized symbols (`'$100'` becomes `'100'`, `'<5'` becomes `'5'`, etc.). | ||
`slugify` maps them to words (`'$100'` becomes `'dollar100'`, `'<5'` becomes `'less5'`, etc.). | ||
- **Empty Output:** `slug` will return a short, predictable hash (`' '` becomes `'icag'` and `'🎉'` becomes `'8joiq'`). | ||
`slugify` will return an empty string (`' '` and `'🎉'` become `''`). | ||
- **Stability:** `slug` is planning [a new release](https://github.com/Trott/slug/blob/beta/CHANGELOG.md) that will drop support for CommonJS | ||
and only support ESM modules. | ||
`slugify` will continue to support CommonJS and is likely to remain stable for the foreseeable future. | ||
## Example | ||
@@ -128,1 +113,21 @@ | ||
``` | ||
## Differences between `slug` and `slugify` packages | ||
Here are some key differences between this package and [`slugify`](https://github.com/simov/slugify). | ||
- **Defaults:** `slug` has the `lower` option enabled by default, lowercasing all slugs | ||
(`'On SALE'` becomes `'on-sale'`). | ||
`slugify` has the `lower` option disabled by default (`'On SALE'` becomes `'On-SALE'`). | ||
- **Symbols:** `slug` removes unrecognized symbols (`'$100'` becomes `'100'`, `'<5'` becomes `'5'`, etc.). | ||
`slugify` maps them to words (`'$100'` becomes `'dollar100'`, `'<5'` becomes `'less5'`, etc.). | ||
- **Empty Output:** `slug` will return a short, predictable hash (`' '` becomes `'icag'` and `'🎉'` becomes `'8joiq'`). | ||
`slugify` will return an empty string (`' '` and `'🎉'` become `''`). | ||
- **Stability:** `slug` is planning [a new release](https://github.com/Trott/slug/blob/beta/CHANGELOG.md) that will drop support for CommonJS | ||
and only support ESM modules. | ||
`slugify` will continue to support CommonJS and is likely to remain stable for the foreseeable future. | ||
## Playground | ||
A (painfully minimal) web playground is available at https://trott.github.io/slug/. It doesn't allow you to specify options, so it's utility is | ||
minimal. Pull requests welcome to add the ability to specify options. |
33330
132