assertString.js 299 B

123456789101112
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = assertString;
  6. function assertString(input) {
  7. if (typeof input !== 'string') {
  8. throw new TypeError('This library (validator.js) validates strings only');
  9. }
  10. }
  11. module.exports = exports['default'];