MCPcopy Create free account
hub / github.com/eclipsesource/jsonforms / formatIs

Function formatIs

packages/core/src/testers/testers.ts:188–194  ·  view source on GitHub ↗
(expectedFormat: string)

Source from the content-addressed store, hash-verified

186 * @param {string} expectedFormat the expected format of the resolved sub-schema
187 */
188export const formatIs = (expectedFormat: string): Tester =>
189 schemaMatches(
190 (schema) =>
191 !isEmpty(schema) &&
192 schema.format === expectedFormat &&
193 hasType(schema, 'string')
194 );
195
196/**
197 * Checks whether the given UI schema has the expected type.

Callers 3

testers.test.tsFile · 0.90
testers.tsFile · 0.85

Calls 2

hasTypeFunction · 0.90
schemaMatchesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…