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 0.4.0 to 0.4.1

.LICENSE.un~

5

package.json
{ "name": "slug"
, "description": "slugifies even utf-8 chars!"
, "version": "0.4.0"
, "version": "0.4.1"
, "homepage": "https://github.com/dodo/node-slug"

@@ -18,2 +18,5 @@ , "author": "dodo (https://github.com/dodo)"

"coffee-script": ">= 1.1.2"}
, "licenses" : [
{ "type": "MIT" ,
"url": "http://github.com/dodo/node-slug/raw/master/LICENSE"} ]
}

36

README.md

@@ -1,5 +0,17 @@

# slugify string
# [slug](https://github.com/dodo/node-slug)
slugifies every string, even when it contains unicode!
Make strings url-safe.
- Comprehensive tests
- No dependencies (except the unicode table)
- Not in coffee-script (except the tests lol)
- Coerces foreign symbols to their english equivalent
- Works in browser (window.slug) and AMD/CommonJS-flavoured module loaders (except the unicode symbols unless you use browserify but who wants to download a ~2mb js file, right?)
```
npm install slug
```
## example

@@ -17,4 +29,24 @@

'i-freaking-love-unicode'
> slug('unicode ♥ is ☢') # yes!
'unicode-love-is-radioactive'
```
[![Build Status](https://secure.travis-ci.org/dodo/node-slug.png)](http://travis-ci.org/dodo/node-slug)
## options
```javascript
// options is either object or replacement (sets options.replacement)
slug('string', [{options} || 'replacement']);
```
```javascript
slug.defaults = {
replacement: '-', // replace spaces with replacement
symbols: true, // replace unicode symbols or not
charmap: slug.charmap, // replace special characters
};
```
[![Build Status](https://secure.travis-ci.org/dodo/node-slug.png)](http://travis-ci.org/dodo/node-slug)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/dodo/node-slug/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
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