Sha256: 3ae220db4e0909eab5630545622c1475e5de7777b5e8dea8c1ffa31e298a0dd4

Contents?: true

Size: 1.23 KB

Versions: 35

Compression:

Stored size: 1.23 KB

Contents

declare class GraphemerHelper {
    /**
     * Check if the the character at the position {pos} of the string is surrogate
     * @param str {string}
     * @param pos {number}
     * @returns {boolean}
     */
    static isSurrogate(str: string, pos: number): boolean;
    /**
     * The String.prototype.codePointAt polyfill
     * Private function, gets a Unicode code point from a JavaScript UTF-16 string
     * handling surrogate pairs appropriately
     * @param str {string}
     * @param idx {number}
     * @returns {number}
     */
    static codePointAt(str: string, idx: number): number;
    /**
     * Private function, returns whether a break is allowed between the two given grapheme breaking classes
     * Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters
     * @param start {number}
     * @param mid {Array<number>}
     * @param end {number}
     * @param startEmoji {number}
     * @param midEmoji {Array<number>}
     * @param endEmoji {number}
     * @returns {number}
     */
    static shouldBreak(start: number, mid: number[], end: number, startEmoji: number, midEmoji: number[], endEmoji: number): number;
}
export default GraphemerHelper;
//# sourceMappingURL=GraphemerHelper.d.ts.map

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.51 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.50 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.49 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.48 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.47 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.46 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.45 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.32 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.31 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.30 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.29 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.28 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.27 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.26 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.25 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.24 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.23 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.22 node_modules/graphemer/lib/GraphemerHelper.d.ts
immosquare-cleaner-0.1.21 node_modules/graphemer/lib/GraphemerHelper.d.ts