Sha256: 26e39d02e6ec1b83645c9a472c0babe841a0c5ea828154fb4b80927d609baa89

Contents?: true

Size: 868 Bytes

Versions: 164

Compression:

Stored size: 868 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = validate;
exports.validateChild = validateChild;
exports.validateField = validateField;
var _index = require("../definitions/index.js");
function validate(node, key, val) {
  if (!node) return;
  const fields = _index.NODE_FIELDS[node.type];
  if (!fields) return;
  const field = fields[key];
  validateField(node, key, val, field);
  validateChild(node, key, val);
}
function validateField(node, key, val, field) {
  if (!(field != null && field.validate)) return;
  if (field.optional && val == null) return;
  field.validate(node, key, val);
}
function validateChild(node, key, val) {
  if (val == null) return;
  const validate = _index.NODE_PARENT_VALIDATIONS[val.type];
  if (!validate) return;
  validate(node, key, val);
}

//# sourceMappingURL=validate.js.map

Version data entries

164 entries across 16 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.48 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-module-imports/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-environment-visitor/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js