vineyard-schema
TypeScript icon, indicating that this package has built-in type declarations

0.2.7 • Public • Published

Vineyard Schema

Vineyard Schema is a library for defining data structures and their relationships. The definition for a schema is normally stored in a JSON file.

Defining a Schema

import {Schema} from 'vineyard-schema'

const schema = new Schema({
        
    Character: {
        properties: {
            name: {
                type: "string"
            },
            items: {
                type: "list",
                trellis: "Item"
            },
        }
    },
    
    Item: {
        properties: {
            name: {
                type: "string"
            },
            character: {
                type: "Character",
            },
        }
    },
        
        

Readme

Keywords

none

Package Sidebar

Install

npm i vineyard-schema

Weekly Downloads

11

Version

0.2.7

License

MIT

Last publish

Collaborators

  • silentorb