mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 02:27:20 -04:00
1 line
524 B
JavaScript
1 line
524 B
JavaScript
"use strict";function findEndOfExpression(e,s,r){for(var l=0,a=0;r<s;++r){var o=e[r].charCodeAt(0);if(!(l||a||o!==_globals.semicolon&&o!==_globals.closedCurlyBracket))return r-1;switch(o){case _globals.openedCurlyBracket:a++;break;case _globals.closedCurlyBracket:a--;break;case _globals.openedParenthesis:l++;break;case _globals.closedParenthesis:l--}}return-1}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=findEndOfExpression;var _globals=require("./globals");module.exports=exports["default"]; |