Yang Guo | 4fd355c | 2019-09-19 08:59:03 | [diff] [blame] | 1 | 'use strict'; |
2 | const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]'; | ||||
3 | |||||
Tim van der Lippe | b97da6b | 2021-02-12 14:32:53 | [diff] [blame] | 4 | const astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); |
5 | |||||
6 | module.exports = astralRegex; |