UNPKG

@keymanapp/common-types

Version:

Keyman Developer keyboard file types

32 lines (30 loc) 1.05 kB
/** * Parsed UnicodeSet, return value of of parseUnicodeSet() */ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a03d654a-a13b-5eeb-b1e9-a389277668a5")}catch(e){}}(); export class UnicodeSet { pattern; ranges; /** * A UnicodeSet in range form. * For example, `[ħa-z]` will parse to * ranges = `[[0x41, 0x7A], [0x0127, 0x0127]]` meaning `[a,z], [ħ,ħ]` * @param pattern the pattern per UnicodeSet syntax such as `[a-z]` * @param ranges array of 2-element arrays, 'start' and 'end'. */ constructor(pattern, ranges) { this.pattern = pattern; this.ranges = ranges; } /** * Number of ranges */ get length() { return this.ranges.length; } toString() { return this.pattern; } } //# sourceMappingURL=unicodeset-parser-api.js.map //# debugId=a03d654a-a13b-5eeb-b1e9-a389277668a5