MCPcopy Index your code
hub / github.com/RubyLouvre/anu / is

Function is

test/babel.js:738–749  ·  view source on GitHub ↗
(type, node, opts)

Source from the content-addressed store, hash-verified

736 var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS));
737
738 function is(type, node, opts) {
739 if (!node) return false;
740
741 var matches = isType(node.type, type);
742 if (!matches) return false;
743
744 if (typeof opts === "undefined") {
745 return true;
746 } else {
747 return t.shallowEqual(node, opts);
748 }
749 }
750
751 function isType(nodeType, targetType) {
752 if (nodeType === targetType) return true;

Callers 1

registerTypeFunction · 0.70

Calls 1

isTypeFunction · 0.85

Tested by

no test coverage detected