Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

slug

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slug - npm Package Compare versions

Comparing version 8.0.0 to 8.1.0

7

CHANGELOG.md

@@ -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 @@

2

package.json
{
"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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc