How to use the func function from joi

Find comprehensive JavaScript joi.func code examples handpicked from public code repositorys.

64
65
66
67
68
69
70
71
72
73

    return this.$_addRule({ name: 'notInstanceOf', args: { fn } });
},
args: [{
    name: 'fn',
    assert: Joi.func().required()
}],
validate(value, helpers, args) {

    if (value instanceof args.fn) {
fork icon44
star icon264
watch icon26

+ 11 other calls in file

107
108
109
110
111
112
113
114
115
116
// a short textual description
description: joi.string()
    .optional(),

// returns the qualified name of the rel (including the namespace)
qname: joi.func()
    .optional()
    .default(function () {
        return this.namespace ? util.format('%s:%s', this.namespace.prefix, this.name) : this.name;
    })
fork icon23
star icon0
watch icon1

+ 11 other calls in file

78
79
80
81
82
83
84
85
86
87
    },
    site: joi.string(),
}).required(),
topic: joi.string().required(),
groupId: joi.string().required(),
queueProcessor: joi.func(),
fromOffset: joi.alternatives().try('latest', 'earliest', 'none'),
concurrency: joi.number().greater(0).default(CONCURRENCY_DEFAULT),
fetchMaxBytes: joi.number(),
canary: joi.boolean().default(false),
fork icon18
star icon51
watch icon60

+ 3 other calls in file

108
109
110
111
112
113
114
115
116
117
rollingWindow: Joi.object().keys({
  trailing: timeInterval,
  leading: timeInterval,
  offset: Joi.any().valid('start', 'end')
}),
drillMemberReferences: Joi.func(),
drillMembers: Joi.func(),
drillFilters: Joi.array().items(
  Joi.object().keys({
    sql: Joi.func().required()
fork icon0
star icon0
watch icon149

+ 364 other calls in file

114
115
116
117
118
119
120
121
122
123
  trailing: timeInterval,
  leading: timeInterval,
  offset: Joi.any().valid('start', 'end')
}),
drillMemberReferences: Joi.func(),
drillMembers: Joi.func(),
drillFilters: Joi.array().items(
  Joi.object().keys({
    sql: Joi.func().required()
  })
fork icon0
star icon0
watch icon149

+ 145 other calls in file

155
156
157
158
159
160
161
162
163
164
};


internals.pre = [
    Joi.string(),
    Joi.func(),
    Joi.object({
        method: [Joi.string().required(), Joi.func().required()],
        assign: Joi.string(),
        mode: Joi.string().valid('serial', 'parallel'),
fork icon0
star icon0
watch icon4

+ 15 other calls in file