UNPKG

i18n-node-server

Version:

NodeJS http server to store your internationalized phrases

19 lines 540 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateIdent = void 0; const identRegex = /[a-zA-Z0-9\.\_\-\,]+/gi; function validateIdent(ident) { if (typeof ident !== "string") { return false; } if (!ident) { return false; } const matched = ident.match(identRegex); if (!matched || !matched.length) { return false; } return matched[0] === ident; } exports.validateIdent = validateIdent; //# sourceMappingURL=valid-ident.js.map