mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 15:55:08 +03:00
59f4570ee7
refs: https://github.com/TryGhost/Ghost/issues/14882 * refactored security.password to use native bcrypt promises * refactored security.string to use more modern es features
10 lines
302 B
JavaScript
10 lines
302 B
JavaScript
const slugify = require('@tryghost/string').slugify;
|
|
|
|
module.exports.safe = function safe(string, options = {}) {
|
|
let opts = {requiredChangesOnly: true};
|
|
if (!('importing' in options) || !options.importing) {
|
|
opts.requiredChangesOnly = false;
|
|
}
|
|
return slugify(string, opts);
|
|
};
|