Skip to content

Function

Alan Berdinelli edited this page Oct 8, 2020 · 1 revision

Function validates the value is a function

const Schemy = require('schemy');

const Example = new Schemy({
    callback: {
        type: Function
    }
});

// This should validate true
Example.validate({
    callback: function() {
        console.log('Callback');
    }
});

Clone this wiki locally