isVariableWidth.js 606 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isVariableWidth;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. var _isFullWidth = require("./isFullWidth");
  8. var _isHalfWidth = require("./isHalfWidth");
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. function isVariableWidth(str) {
  11. (0, _assertString.default)(str);
  12. return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str);
  13. }
  14. module.exports = exports.default;
  15. module.exports.default = exports.default;