isFullWidth.js 524 B

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