pse-edge
Version:
A NodeJS wrapper for the PSE Edge platform
16 lines (15 loc) • 543 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.camelCase = exports.unEntity = void 0;
var unEntity = function (str) {
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
};
exports.unEntity = unEntity;
var camelCase = function (str) {
return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) {
if (+match === 0)
return '';
return index === 0 ? match.toLowerCase() : match.toUpperCase();
});
};
exports.camelCase = camelCase;