UNPKG

pse-edge

Version:

A NodeJS wrapper for the PSE Edge platform

16 lines (15 loc) 543 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.camelCase = exports.unEntity = void 0; var unEntity = function (str) { return str.replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/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;