isVariableWidth.js 604 B

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