mirror of
https://github.com/wu736139669/Monkey-Test.git
synced 2026-08-05 05:55:46 +00:00
19 lines
569 B
JavaScript
19 lines
569 B
JavaScript
// Matches a whole line break (where CRLF is considered a single
|
|
// line break). Used to count lines.
|
|
|
|
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.isNewLine = isNewLine;
|
|
var lineBreak = /\r\n?|\n|\u2028|\u2029/;
|
|
exports.lineBreak = lineBreak;
|
|
var lineBreakG = new RegExp(lineBreak.source, "g");
|
|
|
|
exports.lineBreakG = lineBreakG;
|
|
|
|
function isNewLine(code) {
|
|
return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
|
|
}
|
|
|
|
var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
|
|
exports.nonASCIIwhitespace = nonASCIIwhitespace; |