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.49 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.49 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.49 node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 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.48 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.48 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-classes/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.48 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helpers/node_modules/@babel/types/lib/validators/validate.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-wrap-function/node_modules/@babel/types/lib/validators/validate.js