Allow empty options object for sanitizeSlug.

This commit is contained in:
Caleb 2017-10-03 16:08:23 -06:00
parent 716f55cd8e
commit 2b64fbfba6

View File

@ -43,7 +43,7 @@ export function sanitizeIRI(str, { replacement = "" } = {}) {
return result;
}
export function sanitizeSlug(str, { replacement = '-' }) {
export function sanitizeSlug(str, { replacement = '-' } = {}) {
if (!isString(str)) throw "`sanitizeSlug` only accepts strings as input.";
if (!isString(replacement)) throw "the `sanitizeSlug` replacement character must be a string.";