@rjsf/utils
Version:
Utility functions for @rjsf/core
9 lines (8 loc) • 483 B
TypeScript
import { RJSFSchema, StrictRJSFSchema } from './types.js';
/** Stringifies the schema and returns the hash of the resulting string. Sorts schema fields
* in consistent order before stringify to prevent different hash ids for the same schema.
*
* @param schema - The schema for which the hash is desired
* @returns - The string obtained from the hash of the stringified schema
*/
export default function hashForSchema<S extends StrictRJSFSchema = RJSFSchema>(schema: S): string;