UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

15 lines (14 loc) 360 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // todo: tests function getNextMatchingPos(text, pos, condition) { while (pos < text.length) { var char = text[pos]; if (!condition(char)) pos++; else break; } return pos; } exports.getNextMatchingPos = getNextMatchingPos;