source: trip-planner-front/node_modules/@babel/types/lib/validators/isType.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 529 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = isType;
7
8var _definitions = require("../definitions");
9
10function isType(nodeType, targetType) {
11 if (nodeType === targetType) return true;
12 if (_definitions.ALIAS_KEYS[targetType]) return false;
13 const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
14
15 if (aliases) {
16 if (aliases[0] === nodeType) return true;
17
18 for (const alias of aliases) {
19 if (nodeType === alias) return true;
20 }
21 }
22
23 return false;
24}
Note: See TracBrowser for help on using the repository browser.