@technobuddha/library
Version:
A large library of useful functions
15 lines (14 loc) • 436 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toDotCase = void 0;
/**
* Convert an identifier string to a dot form
*
* @param input The identifier string
* @returns the identifier in dot form
*/
function toDotCase(input) {
return input.trim().replace(/[-_.\s]+\w/ug, function (c) { return "." + c.slice(-1); }).toLowerCase();
}
exports.toDotCase = toDotCase;
exports.default = toDotCase;