Comparing version 3.3.5 to 3.3.6
{ | ||
"name": "slug", | ||
"description": "slugifies even utf-8 chars!", | ||
"version": "3.3.5", | ||
"version": "3.3.6", | ||
"homepage": "https://github.com/Trott/slug", | ||
@@ -28,2 +28,5 @@ "author": "dodo (https://github.com/dodo)", | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/npm": "^7.0.6", | ||
"chai": "^4.2.0", | ||
@@ -51,4 +54,24 @@ "karma": "^5.0.9", | ||
"release": { | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG", | ||
"package.json" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} | ||
} |
49
slug.js
@@ -180,6 +180,2 @@ /* global btoa */ | ||
slug.defaults = { | ||
mode: 'pretty' | ||
} | ||
const initialMulticharmap = { | ||
@@ -200,3 +196,2 @@ '<3': 'love', | ||
} | ||
slug.multicharmap = slug.defaults.multicharmap = Object.assign({}, initialMulticharmap) | ||
@@ -835,7 +830,30 @@ // https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js | ||
} | ||
slug.charmap = slug.defaults.charmap = Object.assign({}, initialCharmap) | ||
slug.charmap = Object.assign({}, initialCharmap) | ||
slug.multicharmap = Object.assign({}, initialMulticharmap) | ||
slug.defaults = { | ||
charmap: slug.charmap, | ||
mode: 'pretty', | ||
modes: { | ||
rfc3986: { | ||
replacement: '-', | ||
remove: null, | ||
lower: true, | ||
charmap: slug.charmap, | ||
multicharmap: slug.multicharmap | ||
}, | ||
pretty: { | ||
replacement: '-', | ||
remove: null, | ||
lower: true, | ||
charmap: slug.charmap, | ||
multicharmap: slug.multicharmap | ||
} | ||
}, | ||
multicharmap: slug.multicharmap | ||
} | ||
slug.reset = function () { | ||
slug.defaults.modes.rfc3986.charmap = slug.defaults.modes.pretty.charmap = slug.charmap = slug.defaults.charmap = Object.assign({}, initialCharmap) | ||
slug.defaults.modes.rfc3986.multiCharmap = slug.defaults.modes.pretty.multiCharmap = slug.multicharmap = slug.defaults.multicharmap = Object.assign({}, initialMulticharmap) | ||
slug.defaults.modes.rfc3986.multicharmap = slug.defaults.modes.pretty.multicharmap = slug.multicharmap = slug.defaults.multicharmap = Object.assign({}, initialMulticharmap) | ||
} | ||
@@ -847,19 +865,2 @@ | ||
slug.defaults.modes = { | ||
rfc3986: { | ||
replacement: '-', | ||
remove: null, | ||
lower: true, | ||
charmap: slug.defaults.charmap, | ||
multicharmap: slug.defaults.multicharmap | ||
}, | ||
pretty: { | ||
replacement: '-', | ||
remove: null, | ||
lower: true, | ||
charmap: slug.defaults.charmap, | ||
multicharmap: slug.defaults.multicharmap | ||
} | ||
} | ||
/* global define */ | ||
@@ -866,0 +867,0 @@ // Be compatible with different module systems |
Sorry, the diff of this file is not supported yet
29994
891
17