2019-05-07 07:48:28 +03:00
|
|
|
const slugify = require('@tryghost/string').slugify;
|
2017-12-14 15:26:48 +03:00
|
|
|
|
2022-08-02 14:49:17 +03:00
|
|
|
/**
|
|
|
|
* @param {string} string
|
|
|
|
* @param {{importing?: boolean}} [options]
|
|
|
|
*/
|
2022-08-01 18:21:19 +03:00
|
|
|
module.exports.safe = function safe(string, options = {}) {
|
2022-08-02 14:49:17 +03:00
|
|
|
return slugify(string, {requiredChangesOnly: options.importing === true});
|
2017-12-14 15:26:48 +03:00
|
|
|
};
|