src/json-schema.js
function checkSchemaHasReferences(schema) {
  if (schema.$ref) {
    return true;
  }

  return Object.values(schema).some((value) => {
    if (_.isArray(value)) {
      return value.some(checkSchemaHasReferences);
    } else if (_.isObject(value)) {
      return checkSchemaHasReferences(value);
    }

    return false;
  });
}
function checkSchemaHasReferences(schema) {
  if (schema.$ref) {
    return true;
  }

  return Object.values(schema).some((value) => {
    if (_.isArray(value)) {
      return value.some(checkSchemaHasReferences);
    } else if (_.isObject(value)) {
      return checkSchemaHasReferences(value);
    }

    return false;
  });
}
function checkSchemaHasReferences ( schema ) { if ( schema . $ref ) { return true ; } return Object . values ( schema ) . some ( ( value ) => { if ( _ . isArray ( value ) ) { return value . some ( checkSchemaHasReferences ) ; } else if ( _ . isObject ( value ) ) { return checkSchemaHasReferences ( value ) ; } return false ; } ) ; }
Returns true if the given schema contains any references
Returns true if the given schema contains any references