source: frontend/node_modules/@svgr/hast-util-to-babel-ast/lib/one.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 423 bytes
Line 
1"use strict";
2
3exports.__esModule = true;
4exports.default = void 0;
5
6function one(h, node, parent) {
7 const type = node && node.type;
8 const fn = h.handlers[type];
9 /* Fail on non-nodes. */
10
11 if (!type) {
12 throw new Error(`Expected node, got \`${node}\``);
13 }
14
15 if (!fn) {
16 throw new Error(`Node of type ${type} is unknown`);
17 }
18
19 return fn(h, node, parent);
20}
21
22var _default = one;
23exports.default = _default;
Note: See TracBrowser for help on using the repository browser.