1.1.5 • Published 6 years ago
waterline-joi v1.1.5
Waterline Joi
npm i --save waterline-joi
Waterline Blueprint to Joi validation converter.
// Get Waterline.
var Waterline = require('waterline')
// Get the function to convert schemas.
var waterline_to_joi = require("waterline-joi")
// Define your schema.
var schema = {
attributes: {
firstName: {
type: 'string',
required: true
},
lastName: {
type: 'string',
required: true
}
}
}
// Create a Joi schema.
var joi_schema = waterline_to_joi(schema.attributes)
// Create the user
var User = Waterline.Collection.extend(schema)
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
8 years ago
1.0.11
9 years ago
1.0.10
9 years ago
1.0.9
9 years ago
1.0.8
9 years ago
1.0.7
9 years ago
1.0.6
9 years ago
1.0.5
9 years ago
1.0.4
9 years ago
1.0.3
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago