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