1
0
Fork 0
arangodb/js/node/node_modules/joi/lib/function.js

32 lines
551 B
JavaScript
Executable File

// Load modules
var Any = require('./any');
var Errors = require('./errors');
var Hoek = require('hoek');
// Declare internals
var internals = {};
internals.Function = function () {
Any.call(this);
this._type = 'func';
};
Hoek.inherits(internals.Function, Any);
internals.Function.prototype._base = function (value, state, options) {
return {
value: value,
errors: (typeof value === 'function') ? null : Errors.create('function.base', null, state, options)
};
};
module.exports = new internals.Function();