UNPKG

@eluvio/elv-utils-js

Version:

Utilities for the Eluvio Content Fabric

29 lines (23 loc) 617 B
// Specifies concerns, options and checksMap for a Concern or Script const { CheckedResult, FunctionModel, KVMapModelFactory, NonBlankString, ObjectModel } = require('./Models') const OptCheckModel = FunctionModel(Object).return(Boolean) const OptChecksMapModel = KVMapModelFactory(OptCheckModel) const BlueprintModel = ObjectModel({ checksMap: [KVMapModelFactory(OptCheckModel)], concerns: [Array], name: NonBlankString, options: [Array], }) const CheckedBlueprint = CheckedResult(BlueprintModel) module.exports = { BlueprintModel, CheckedBlueprint, OptCheckModel, OptChecksMapModel }