UNPKG

563 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.isNewLine = isNewLine;
7// Matches a whole line break (where CRLF is considered a single
8// line break). Used to count lines.
9
10var lineBreak = exports.lineBreak = /\r\n?|\n|\u2028|\u2029/;
11var lineBreakG = exports.lineBreakG = new RegExp(lineBreak.source, "g");
12
13function isNewLine(code) {
14 return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
15}
16
17var nonASCIIwhitespace = exports.nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
\No newline at end of file