Nostalgic Piano Music

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

    0.2.0 • Public • Published

    mutent-json-schema

    JavaScript Style Guide

    import { Store } from 'mutent'
    import { mutentJsonSchema } from 'mutent-json-schema'
    
    const store = new Store({
      adapter: new MyAdapter(),
      // Add the JSON Schema plugin to the store declaration
      plugins: [
        mutentJsonSchema({
          schema: {
            type: 'object',
            additionalProperties: false,
            properties: {
              version: {
                type: 'integer',
                minimum: 0
              },
              value: {
                type: 'string'
              }
            }
          }
        })
      ]
    })
    
    // Use the store as usual

    Install

    npm i mutent-json-schema

    DownloadsWeekly Downloads

    21

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    5.71 kB

    Total Files

    6

    Last publish

    Collaborators

    • greguz