All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.es.predicates.mjs Maven / Gradle / Ivy

There is a newer version: 0.99.2
Show newest version
import { createPredicate } from '@swagger-api/apidom-core';
import JSONSchemaElement from "./elements/JSONSchema.mjs";
import LinkDescriptionElement from "./elements/LinkDescription.mjs";
export { isJSONReferenceElement } from '@swagger-api/apidom-ns-json-schema-draft-6';
export const isJSONSchemaElement = createPredicate(({
  hasBasicElementProps,
  isElementType,
  primitiveEq
}) => {
  return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchemaDraft7', element) && primitiveEq('object', element);
});
export const isLinkDescriptionElement = createPredicate(({
  hasBasicElementProps,
  isElementType,
  primitiveEq
}) => {
  return element => element instanceof LinkDescriptionElement || hasBasicElementProps(element) && isElementType('linkDescription', element) && primitiveEq('object', element);
});




© 2015 - 2025 Weber Informatics LLC | Privacy Policy