1 var isObjectLike = require('../internal/isObjectLike');
3 /** `Object#toString` result references. */
4 var stringTag = '[object String]';
6 /** Used for native method references. */
7 var objectProto = Object.prototype;
10 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
13 var objToString = objectProto.toString;
16 * Checks if `value` is classified as a `String` primitive or object.
21 * @param {*} value The value to check.
22 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
31 function isString(value) {
32 return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
35 module.exports = isString;