UNPKG

@trust/model

Version:

A PouchDB adapter for the json-document modelling framework.

33 lines (27 loc) 552 B
'use strict' /** * Module Dependencies * @ignore */ const { JWD } = require('@trust/jwt') const MixinModel = require('./MixinModel') const ModelSchema = require('./ModelSchema') /** * CryptoModel * @ignore */ class CryptoModel extends MixinModel(JWD) { constructor (data, options) { data.type = data.type || 'JWS' data.serialization = data.serialization || 'document' super(data, options) } static get schema () { return super.schema.extend(ModelSchema) } } /** * Exports * @ignore */ module.exports = CryptoModel