/**
|
* Modules in this bundle
|
* @license
|
*
|
* type-name:
|
* license: MIT (http://opensource.org/licenses/MIT)
|
* author: Takuto Wada <takuto.wada@gmail.com>
|
* contributors: azu, Yosuke Furukawa, Athan, Andrew Moss
|
* homepage: https://github.com/twada/type-name
|
* version: 2.0.2
|
*
|
* This header is generated by licensify (https://github.com/twada/licensify)
|
*/
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.typeName = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
|
/**
|
* type-name - Just a reasonable typeof
|
*
|
* https://github.com/twada/type-name
|
*
|
* Copyright (c) 2014-2016 Takuto Wada
|
* Licensed under the MIT license.
|
* https://github.com/twada/type-name/blob/master/LICENSE
|
*/
|
'use strict';
|
|
var toStr = Object.prototype.toString;
|
|
function funcName (f) {
|
if (f.name) {
|
return f.name;
|
}
|
var match = /^\s*function\s*([^\(]*)/im.exec(f.toString());
|
return match ? match[1] : '';
|
}
|
|
function ctorName (obj) {
|
var strName = toStr.call(obj).slice(8, -1);
|
if ((strName === 'Object' || strName === 'Error') && obj.constructor) {
|
return funcName(obj.constructor);
|
}
|
return strName;
|
}
|
|
function typeName (val) {
|
var type;
|
if (val === null) {
|
return 'null';
|
}
|
type = typeof val;
|
if (type === 'object') {
|
return ctorName(val);
|
}
|
return type;
|
}
|
|
module.exports = typeName;
|
|
},{}]},{},[1])(1)
|
});
|