MCPcopy Create free account
hub / github.com/dynjs/dynjs / type

Method type

src/main/java/org/dynjs/runtime/Types.java:664–696  ·  view source on GitHub ↗
(Object o)

Source from the content-addressed store, hash-verified

662 }
663
664 public static String type(Object o) {
665 // 11.4.3
666 if (o == UNDEFINED) {
667 return "undefined";
668 }
669
670 if (o == NULL) {
671 return "object";
672 }
673
674 if (o instanceof Boolean) {
675 return "boolean";
676 }
677
678 if (o instanceof Number) {
679 return "number";
680 }
681
682 if (o instanceof JSFunction) {
683 return "function";
684 }
685
686 if (o instanceof JSObject) {
687 return "object";
688 }
689
690 if (o instanceof String) {
691 return "string";
692 }
693
694 return o.getClass().getName();
695
696 }
697
698 // ----------------------------------------------------------------------
699

Callers 3

typeofMethod · 0.95
callMethod · 0.95
coffee-script.jsFile · 0.80

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected