UNPKG

294 BJavaScriptView Raw
1'use strict';
2
3module.exports = function(app, base, options) {
4 return function(val, key, config, schema) {
5 if (typeof val === 'undefined') {
6 return;
7 }
8
9 if (typeof val === 'string') {
10 var obj = {};
11 obj[val] = true;
12 val = obj;
13 }
14
15 return val;
16 };
17};