You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
'use strict' ;
/ * D e r i v e d f r o m ` i s - s t r i n g 1 . 0 . 7 ` , u n d e r M I T l i c e n s e , ( c ) 2 0 1 5 J o r d a n H a r b a n d .
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 ? value instanceof String : toStr . call ( value ) === strClass ;
} ;