isMultibyte.js 563 B

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