class PostmanScenarioIndexerService {

    boolean isEscapedCharacter(String javaScript, int characterIndex) {
        int backslashCount = 0;
        for (int i = characterIndex - 1; i >= 0; i--) {
            if (javaScript.charAt(i) == '\\') {
                backslashCount++;
            } else {
                break;
            }
        }
        return (backslashCount % 2 == 1);
    }

}