Sha256: 92da624fffefe92e4b7e31059e12e252fab8df75123c366410fbd57c16cd71c5
Contents?: true
Size: 718 Bytes
Versions: 66
Compression:
Stored size: 718 Bytes
Contents
// getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./_cof'); var TAG = require('./_wks')('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; };
Version data entries
66 entries across 30 versions & 8 rubygems