sindresorhus / electron-store

Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc
MIT License
4.57k stars 148 forks source link

Required field in schema #263

Open georgecoca opened 1 year ago

georgecoca commented 1 year ago

Is it possible to make a field required in provided schema?

const schema = {
    foo: {
        type: 'number',
        maximum: 100,
        minimum: 1,
        default: 50
    },
    bar: {
        type: 'string', // make it required
        format: 'url'
    }
};

const store = new Store({schema});

Thank you

AutismPatient commented 1 year ago

Hello, you can refer to JSON Schema standard