2c1d0c0bccd107a772a16c489cc838b49b216fc670b56187179a70f738ac5bcac4f7345dd6058cce66f0bb055e3d5fd640148e6f46beb08cbf783d38804c0b 454 B

1234567891011121314151617181920212223242526
  1. 'use strict';
  2. var isObject = require('es-object-atoms/isObject');
  3. // https://262.ecma-international.org/5.1/#sec-8
  4. module.exports = function Type(x) {
  5. if (x === null) {
  6. return 'Null';
  7. }
  8. if (typeof x === 'undefined') {
  9. return 'Undefined';
  10. }
  11. if (isObject(x)) {
  12. return 'Object';
  13. }
  14. if (typeof x === 'number') {
  15. return 'Number';
  16. }
  17. if (typeof x === 'boolean') {
  18. return 'Boolean';
  19. }
  20. if (typeof x === 'string') {
  21. return 'String';
  22. }
  23. };