2 * lodash 4.0.1 (Custom Build) <https://lodash.com/>
3 * Build: `lodash modularize exports="npm" -o ./`
4 * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
5 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
6 * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7 * Available under MIT license <https://lodash.com/license>
10 /** `Object#toString` result references. */
11 var stringTag = '[object String]';
13 /** Used for built-in method references. */
14 var objectProto = Object.prototype;
17 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
20 var objectToString = objectProto.toString;
23 * Checks if `value` is classified as an `Array` object.
29 * @param {*} value The value to check.
30 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
33 * _.isArray([1, 2, 3]);
36 * _.isArray(document.body.children);
45 var isArray = Array.isArray;
48 * Checks if `value` is object-like. A value is object-like if it's not `null`
49 * and has a `typeof` result of "object".
54 * @param {*} value The value to check.
55 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
61 * _.isObjectLike([1, 2, 3]);
64 * _.isObjectLike(_.noop);
67 * _.isObjectLike(null);
70 function isObjectLike(value) {
71 return !!value && typeof value == 'object';
75 * Checks if `value` is classified as a `String` primitive or object.
80 * @param {*} value The value to check.
81 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
90 function isString(value) {
91 return typeof value == 'string' ||
92 (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
95 module.exports = isString;