MCPcopy
hub / github.com/RubyLouvre/anu / registerType

Function registerType

test/babel.js:695–709  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

693 var t = exports;
694
695 function registerType(type) {
696 var is = t["is" + type];
697 if (!is) {
698 is = t["is" + type] = function (node, opts) {
699 return t.is(type, node, opts);
700 };
701 }
702
703 t["assert" + type] = function (node, opts) {
704 opts = opts || {};
705 if (!is(node, opts)) {
706 throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts));
707 }
708 };
709 }
710
711 exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
712 exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;

Callers 1

babel.jsFile · 0.85

Calls 1

isFunction · 0.70

Tested by

no test coverage detected