'use strict'; /* Derived from `is-string 1.0.7`, under MIT license, (c) 2015 Jordan Harband. This version removes the try/catch for performance reasons, and replaces it with a test that unfortunately does not work on cross-realm values, pending an upstream fix. */ var toStr = Object.prototype.toString; var strClass = '[object String]'; var hasToStringTag = require('has-tostringtag/shams')(); module.exports = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? string instanceof String : toStr.call(value) === strClass; };