sucrase
Version:
Super-fast alternative to Babel for when you can target modern JS runtimes
11 lines (10 loc) • 446 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
// Matches a whole line break (where CRLF is considered a single
// line break). Used to count lines.
exports.lineBreak = /\r\n?|\n|\u2028|\u2029/;
function isNewLine(code) {
return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
}
exports.isNewLine = isNewLine;
exports.nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;