mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-23 22:13:48 +01:00
18 lines
488 B
JavaScript
18 lines
488 B
JavaScript
|
/* */
|
||
|
var $ = require("./$"),
|
||
|
TAG = require("./$.wks")('toStringTag'),
|
||
|
toString = {}.toString;
|
||
|
function cof(it) {
|
||
|
return toString.call(it).slice(8, -1);
|
||
|
}
|
||
|
cof.classof = function(it) {
|
||
|
var O,
|
||
|
T;
|
||
|
return it == undefined ? it === undefined ? 'Undefined' : 'Null' : typeof(T = (O = Object(it))[TAG]) == 'string' ? T : cof(O);
|
||
|
};
|
||
|
cof.set = function(it, tag, stat) {
|
||
|
if (it && !$.has(it = stat ? it : it.prototype, TAG))
|
||
|
$.hide(it, TAG, tag);
|
||
|
};
|
||
|
module.exports = cof;
|