X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Funcss%2Fnode_modules%2Flodash%2Finternal%2FisHostObject.js;fp=node_modules%2Funcss%2Fnode_modules%2Flodash%2Finternal%2FisHostObject.js;h=e598c10e341b7bf182ba579ca54d44ae1bd336b6;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/uncss/node_modules/lodash/internal/isHostObject.js b/node_modules/uncss/node_modules/lodash/internal/isHostObject.js new file mode 100644 index 000000000..e598c10e3 --- /dev/null +++ b/node_modules/uncss/node_modules/lodash/internal/isHostObject.js @@ -0,0 +1,20 @@ +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +module.exports = isHostObject;