UNPKG

precis-js

Version:

A JavaScript implementation of RFC 7564 (The PRECIS Framework).

37 lines (23 loc) 1.14 kB
// Generated by CoffeeScript 1.10.0 (function() { var EmptyStringError, UsernameCasePreservedProfile, precis; EmptyStringError = require('../error/EmptyStringError'); precis = require('../constants'); module.exports = UsernameCasePreservedProfile = (function() { function UsernameCasePreservedProfile() {} UsernameCasePreservedProfile.prototype.stringClass = precis.STRING_CLASS.IDENTIFIER; UsernameCasePreservedProfile.prototype.widthMapping = precis.WIDTH_MAPPING.NONE; UsernameCasePreservedProfile.prototype.caseMapping = precis.CASE_MAPPING.NONE; UsernameCasePreservedProfile.prototype.normalization = precis.NORMALIZATION.C; UsernameCasePreservedProfile.prototype.directionality = precis.DIRECTIONALITY.BIDI; UsernameCasePreservedProfile.prototype.prePrepareMap = function(codepoints, preparer) { return preparer.widthMapper.map(codepoints); }; UsernameCasePreservedProfile.prototype.validate = function(codepoints) { if (codepoints.length < 1) { throw new EmptyStringError(); } }; return UsernameCasePreservedProfile; })(); }).call(this);