@incdevco/framework
Version:
node.js lambda framework
29 lines (15 loc) • 418 B
JavaScript
var Promise = require('bluebird');
function StringValidator(config) {
'use strict';
config = config || {};
}
StringValidator.prototype.validate = function (input, context) {
'use strict';
return Promise.try(function () {
if (typeof input !== 'string') {
throw new Error('Must be a string.');
}
return true;
})
};
module.exports = StringValidator;