isFullWidth.js 554 B

1234567891011121314151617181920
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.fullWidth = undefined;
  6. exports.default = isFullWidth;
  7. var _assertString = require('./util/assertString');
  8. var _assertString2 = _interopRequireDefault(_assertString);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. var fullWidth = exports.fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
  11. function isFullWidth(str) {
  12. (0, _assertString2.default)(str);
  13. return fullWidth.test(str);
  14. }