Registry / database / ufc-schema

ufc-schema

JSON →
library0.8.3jsnpmunverified

UFC Schema is a TypeScript library for defining and validating data schemas with a focus on type safety and developer experience. The current stable version is 0.8.3, with an unknown release cadence. It relies on @m-fe/utils for utility functions, making it specific to the M-FE ecosystem. Unlike general-purpose validation libraries like Zod or Yup, UFC Schema is tightly coupled to the M-FE boilerplates and may have limited adoption outside that context. The package ships TypeScript types and is likely ESM-only.

npm install ufc-schema
INSTALL
IMPORT
SIG · UFC-SCHEMA
U
ufc-schema
databasejavascriptv0.8.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Schema
import { Schema } from 'ufc-schema'
const Schema = require('ufc-schema')
ESM-only since inception; named export, not default export.
defineSchema
import { defineSchema } from 'ufc-schema'
import defineSchema from 'ufc-schema'
Named export from 'ufc-schema'.
validate
import { validate } from 'ufc-schema'
import validate from 'ufc-schema'
Named export for schema validation.

Shows how to define a schema and validate an object against it using named exports.

import { defineSchema, validate } from 'ufc-schema'; const userSchema = defineSchema({ name: { type: 'string', required: true }, age: { type: 'number', min: 0 } }); const data = { name: 'Alice', age: 25 }; const result = validate(userSchema, data); console.log(result.valid); // true
Debug
Known issues
breakingufc-schema is tightly coupled to @m-fe/utils; updating @m-fe/utils independently may break schemas.
fix
Pin @m-fe/utils version to match the one used by ufc-schema.
affects: >=0.8.3
gotchaNo README or documentation available; reliance on source code or ecosystem examples.
fix
Refer to GitHub repository for minimal usage hints.
affects: >=0.8.3
deprecatedThe package may be deprecated in favor of more standard schema libraries like Zod.
fix
Consider migrating to Zod for broader community support.
affects: >=0.8.3
Errors
Common errors & fixes
Cannot find module '@m-fe/utils'
Missing peer dependency @m-fe/utils.
fix
npm install @m-fe/utils
TypeError: Schema is not a constructor
Using require() on an ESM-only package.
fix
Use ESM import syntax or ensure your project is configured for ESM.
Export 'defineSchema' was not found in 'ufc-schema'
Incorrect import path or the export doesn't exist.
fix
Check available exports via import * as ufc from 'ufc-schema'.
Upgrade
Version history
0.8.3latest on npm
Audit
Dependencies
@m-fe/utilsrequiredPeer dependency required for utility functions
Agent activity
25 hits · last 30 days
node
20
Meta
2
OpenAI (training)
1
Resources
ufc-schema — npm install ufc-schema · libregistry