Ghost/ghost/security/lib/string.js
Vikas Potluri 59f4570ee7
refactored security.password to use native bcrypt promises (#15126)
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
2022-08-01 16:21:19 +01:00

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);
};