Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
424 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = assertNode;
|
---|
7 |
|
---|
8 | var _isNode = require("../validators/isNode");
|
---|
9 |
|
---|
10 | function assertNode(node) {
|
---|
11 | if (!(0, _isNode.default)(node)) {
|
---|
12 | var _node$type;
|
---|
13 |
|
---|
14 | const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
|
---|
15 | throw new TypeError(`Not a valid node of type "${type}"`);
|
---|
16 | }
|
---|
17 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.