mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
bcafb84c44
refs #15126 - Logic can be simplified - Add JSDoc types
10 lines
274 B
JavaScript
10 lines
274 B
JavaScript
const slugify = require('@tryghost/string').slugify;
|
|
|
|
/**
|
|
* @param {string} string
|
|
* @param {{importing?: boolean}} [options]
|
|
*/
|
|
module.exports.safe = function safe(string, options = {}) {
|
|
return slugify(string, {requiredChangesOnly: options.importing === true});
|
|
};
|