quala-node
Version:
client library for quala
18 lines (17 loc) • 296 B
text/typescript
/**
* Remove trailing slashes from the given `str`
*
* @api public
* @param {String} str
* @return {String}
*/
export default function (str: string) {
return String(str).replace(exports.expr, '');
};
/**
* Expose the regex
*
* @api private
* @type {RegExp}
*/
exports.expr = /\/+$/;