INNER CODE UNIT · TypeScript

convertSchema

transitive-bullshit/functional-typescript · packages/fts-validator/src/index.ts:88

function convertSchema(
  schema: any,
  transform: (schema: any, key: string) => void
): any {
  for (const key in schema) {
    if (schema.hasOwnProperty(key)) {
      transform(schema, key)

      const value = schema[key]
      if (typeof value === 'object') {
        convertSchema(value, transform)
      }
    }
  }
}

/**
 * Performs **decoding** during schema validation of non-JSON-primitive data

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…