UNPKG

320 BJavaScriptView Raw
1'use strict';
2
3module.exports = function(app, options) {
4 return function(val, key, config, schema) {
5 if (typeof val === 'undefined') {
6 return;
7 }
8 if (typeof val === 'boolean') {
9 val = { render: val };
10 }
11 if (val === 'render') {
12 val = { render: true };
13 }
14 return val;
15 };
16};