Sha256: 19860a4dcaa1dd6ba506ca3090b9827eb577e831332db070866cb8edbfc66a3b

Contents?: true

Size: 711 Bytes

Versions: 167

Compression:

Stored size: 711 Bytes

Contents

/**
 * toString ref.
 */

var toString = Object.prototype.toString;

/**
 * Return the type of `val`.
 *
 * @param {Mixed} val
 * @return {String}
 * @api public
 */

module.exports = function(val){
  switch (toString.call(val)) {
    case '[object Function]': return 'function';
    case '[object Date]': return 'date';
    case '[object RegExp]': return 'regexp';
    case '[object Arguments]': return 'arguments';
    case '[object Array]': return 'array';
    case '[object String]': return 'string';
  }

  if (val === null) return 'null';
  if (val === undefined) return 'undefined';
  if (val && val.nodeType === 1) return 'element';
  if (val === Object(val)) return 'object';

  return typeof val;
};

Version data entries

167 entries across 94 versions & 1 rubygems

Version Path
ende-0.5.22 components/indefinido/indemma/master/components/component/type/1.0.0/index.js
ende-0.5.22 components/component/type/1.0.0/index.js
ende-0.5.21 components/indefinido/indemma/master/components/component/type/1.0.0/index.js
ende-0.5.21 components/component/type/1.0.0/index.js
ende-0.5.20 components/component/type/1.0.0/index.js
ende-0.5.19 components/component/type/1.0.0/index.js
ende-0.5.18 components/component/type/1.0.0/index.js
ende-0.5.17 components/component/type/1.0.0/index.js
ende-0.5.16 components/component/type/1.0.0/index.js
ende-0.5.15 components/component/type/1.0.0/index.js
ende-0.5.14 components/component/type/1.0.0/index.js
ende-0.5.13 components/component/type/1.0.0/index.js
ende-0.5.12 components/component/type/1.0.0/index.js
ende-0.5.10 components/component/type/1.0.0/index.js
ende-0.5.9 components/component/type/1.0.0/index.js
ende-0.5.8 components/component/type/1.0.0/index.js
ende-0.5.7 components/component/type/1.0.0/index.js
ende-0.5.6 components/component/type/1.0.0/index.js
ende-0.4.25 vendor/components/component-type/index.js
ende-0.4.25 vendor/components/indefinido-indemma/components/component-type/index.js