UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for static analysis and code manipulation.

16 lines (15 loc) 725 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var getNextMatchingPos_1 = require("./getNextMatchingPos"); var getPreviousMatchingPos_1 = require("./getPreviousMatchingPos"); function getNextNonWhitespacePos(text, pos) { return getNextMatchingPos_1.getNextMatchingPos(text, pos, isNotWhitespace); } exports.getNextNonWhitespacePos = getNextNonWhitespacePos; function getPreviousNonWhitespacePos(text, pos) { return getPreviousMatchingPos_1.getPreviousMatchingPos(text, pos, isNotWhitespace); } exports.getPreviousNonWhitespacePos = getPreviousNonWhitespacePos; function isNotWhitespace(char) { return char !== " " && char !== "\t" && char !== "\r" && char !== "\n"; }