Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function assertNode(node?) {
if (!isNode(node)) {
throw new TypeError("Not a valid node " + (node && node.type));
}
}
/**
* TODO
*/
export function isNode(node?): boolean {
return !!(node && VISITOR_KEYS[node.type]);
}
// Optimize property access.
toFastProperties(t);
toFastProperties(t.VISITOR_KEYS);
//
export * from "./retrievers";
export * from "./validators";
export * from "./converters";
export * from "./flow";
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
BUILDER_KEYS,
DEPRECATED_KEYS,
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
PLACEHOLDERS,
if (!isNode(node)) {
throw new TypeError("Not a valid node " + (node && node.type));
}
}
/**
* TODO
*/
export function isNode(node?): boolean {
return !!(node && VISITOR_KEYS[node.type]);
}
// Optimize property access.
toFastProperties(t);
toFastProperties(t.VISITOR_KEYS);
//
export * from "./retrievers";
export * from "./validators";
export * from "./converters";
export * from "./flow";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
TYPES,
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
import {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,
BUILDER_KEYS,
DEPRECATED_KEYS,
} from "./utils";
import {
PLACEHOLDERS,
PLACEHOLDERS_ALIAS,
PLACEHOLDERS_FLIPPED_ALIAS,
} from "./placeholders";
// We do this here, because at this point the visitor keys should be ready and setup
toFastProperties(VISITOR_KEYS);
toFastProperties(ALIAS_KEYS);
toFastProperties(FLIPPED_ALIAS_KEYS);
toFastProperties(NODE_FIELDS);
toFastProperties(BUILDER_KEYS);
toFastProperties(DEPRECATED_KEYS);
toFastProperties(PLACEHOLDERS_ALIAS);
toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
const TYPES: Array = Object.keys(VISITOR_KEYS)
.concat(Object.keys(FLIPPED_ALIAS_KEYS))
.concat(Object.keys(DEPRECATED_KEYS));
export {
VISITOR_KEYS,
ALIAS_KEYS,
FLIPPED_ALIAS_KEYS,
NODE_FIELDS,