isMultibyte.js 565 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isMultibyte;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. /* eslint-disable no-control-regex */
  9. var multibyte = /[^\x00-\x7F]/;
  10. /* eslint-enable no-control-regex */
  11. function isMultibyte(str) {
  12. (0, _assertString.default)(str);
  13. return multibyte.test(str);
  14. }
  15. module.exports = exports.default;
  16. module.exports.default = exports.default;