%
var word = _params.word,
tableStyle = _params.tableStyle,
rows = _params.rows;
%>
<%if( Object.prototype.toString.call(rows) === '[object Array]' ) {%>
| <%=word.property || "Property"%> |
<%=word.description || "Description"%> |
<% if(rows.length > 0){
rows.forEach(function(ele){
tr(0, ele);
});
} else {
%>
| - |
- |
<% }%>
<%} else {%>
Is not array.
<%}%>
<%function tr(deep, params){%>
| <%=getBlockquote(deep) + params.key + getTypeMark(params.type)%> |
<%=params.descTx%> |
<%if(params.more){
params.more.forEach(function(ele){
tr(deep+1, ele);
});
}}%>
<%
function getBlockquote(deep) {
return new Array(deep*6).fill(" ").join("") + (deep > 0 ? "." : "");
}
function getTypeMark(type) {
return type == 'array' ? ' [ ]' : '';
}
%>