isSurrogatePair.js 524 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isSurrogatePair;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/;
  9. function isSurrogatePair(str) {
  10. (0, _assertString.default)(str);
  11. return surrogatePair.test(str);
  12. }
  13. module.exports = exports.default;
  14. module.exports.default = exports.default;