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

@sindresorhus/slugify

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sindresorhus/slugify - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

index.d.ts

12

index.js

@@ -27,3 +27,3 @@ 'use strict';

module.exports = (string, options) => {
const slugify = (string, options) => {
if (typeof string !== 'string') {

@@ -33,8 +33,9 @@ throw new TypeError(`Expected a string, got \`${typeof string}\``);

options = Object.assign({
options = {
separator: '-',
lowercase: true,
decamelize: true,
customReplacements: []
}, options);
customReplacements: [],
...options
};

@@ -69,1 +70,4 @@ const separator = escapeStringRegexp(options.separator);

};
module.exports = slugify;
module.exports.default = slugify;
{
"name": "@sindresorhus/slugify",
"version": "0.8.0",
"version": "0.9.0",
"description": "Slugify a string",

@@ -13,9 +13,10 @@ "license": "MIT",

"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd-check"
},
"files": [
"index.js",
"index.d.ts",
"replacements.js",

@@ -48,5 +49,6 @@ "overridable-replacements.js"

"devDependencies": {
"ava": "^0.25.0",
"xo": "^0.23.0"
"ava": "^1.3.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
}
}

@@ -57,2 +57,4 @@ # slugify [![Build Status](https://travis-ci.org/sindresorhus/slugify.svg?branch=master)](https://travis-ci.org/sindresorhus/slugify)

```js
const slugify = require('@sindresorhus/slugify');
slugify('BAR and baz');

@@ -73,2 +75,4 @@ //=> 'bar-and-baz'

```js
const slugify = require('@sindresorhus/slugify');
slugify('Déjà Vu!');

@@ -89,2 +93,4 @@ //=> 'deja-vu'

```js
const slugify = require('@sindresorhus/slugify');
slugify('fooBar');

@@ -109,2 +115,4 @@ //=> 'foo-bar'

```js
const slugify = require('@sindresorhus/slugify');
slugify('Foo@unicorn', {

@@ -121,2 +129,4 @@ customReplacements: [

```js
const slugify = require('@sindresorhus/slugify');
slugify('foo@unicorn', {

@@ -123,0 +133,0 @@ customReplacements: [

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