mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
14 lines
281 B
JavaScript
14 lines
281 B
JavaScript
|
/*
|
||
|
* Misc functions
|
||
|
*/
|
||
|
|
||
|
'use strict'
|
||
|
|
||
|
/*
|
||
|
* return true/false if the given string contains non-BMP chars
|
||
|
*/
|
||
|
exports.containsNonBmpChars = function utilContainsNonBmpChars(str) {
|
||
|
// check for first (high) surrogate in a non-BMP character
|
||
|
return /[\uD800-\uDBFF]/.test(str)
|
||
|
}
|