1.1.5 • Published 8 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
8 years ago
1.1.4
8 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.14
9 years ago
1.0.13
9 years ago
1.0.12
9 years ago
1.0.11
10 years ago
1.0.10
10 years ago
1.0.9
10 years ago
1.0.8
10 years ago
1.0.7
10 years ago
1.0.6
10 years ago
1.0.5
10 years ago
1.0.4
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago