diff options
Diffstat (limited to 'node_modules/babylon/lib/util/whitespace.js')
-rw-r--r-- | node_modules/babylon/lib/util/whitespace.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/babylon/lib/util/whitespace.js b/node_modules/babylon/lib/util/whitespace.js new file mode 100644 index 000000000..ddff0270c --- /dev/null +++ b/node_modules/babylon/lib/util/whitespace.js @@ -0,0 +1,15 @@ +"use strict"; + +exports.__esModule = true; +exports.isNewLine = isNewLine; +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +var lineBreak = exports.lineBreak = /\r\n?|\n|\u2028|\u2029/; +var lineBreakG = exports.lineBreakG = new RegExp(lineBreak.source, "g"); + +function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; +} + +var nonASCIIwhitespace = exports.nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
\ No newline at end of file |