install gulp to process code
This commit is contained in:
parent
24f6606c2c
commit
b6a3900ee2
1651 changed files with 253427 additions and 39 deletions
45
node_modules/kind-of/index.js
generated
vendored
Normal file
45
node_modules/kind-of/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
var toString = Object.prototype.toString;
|
||||
|
||||
/**
|
||||
* Get the native `typeof` a value.
|
||||
*
|
||||
* @param {*} `val`
|
||||
* @return {*} Native javascript type
|
||||
*/
|
||||
|
||||
module.exports = function kindOf(val) {
|
||||
if (val === undefined) {
|
||||
return 'undefined';
|
||||
}
|
||||
if (val === null) {
|
||||
return 'null';
|
||||
}
|
||||
if (val === true || val === false || val instanceof Boolean) {
|
||||
return 'boolean';
|
||||
}
|
||||
if (typeof val !== 'object') {
|
||||
return typeof val;
|
||||
}
|
||||
if (Array.isArray(val)) {
|
||||
return 'array';
|
||||
}
|
||||
|
||||
var type = toString.call(val);
|
||||
|
||||
if (val instanceof RegExp || type === '[object RegExp]') {
|
||||
return 'regexp';
|
||||
}
|
||||
if (val instanceof Date || type === '[object Date]') {
|
||||
return 'date';
|
||||
}
|
||||
if (type === '[object Function]') {
|
||||
return 'function';
|
||||
}
|
||||
if (type === '[object Arguments]') {
|
||||
return 'arguments';
|
||||
}
|
||||
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
|
||||
return 'buffer';
|
||||
}
|
||||
return type.slice(8, -1).toLowerCase();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue