RackHD/on-http

View on GitHub
data/views/catalogs.2.0.json

Summary

Maintainability
Test Coverage
{
    "id": "<%= id %>",
    "node": "<%=basepath%>/nodes/<%=node%>",
    <% if ( typeof(createdAt.toISOString) === "function" ) { %>
    "createdAt": "<%= createdAt.toISOString() %>",
    <% } else { %>
    "createdAt": "<%= createdAt %>",
    <% } %>
    <% if ( typeof(updatedAt.toISOString) === "function" ) { %>
    "updatedAt": "<%= updatedAt.toISOString() %>",
    <% } else { %>
    "updatedAt": "<%= updatedAt %>",
    <% } %>

    <% if (source !== null) { %>
    "source": "<%= source %>",
    <% } else { %>
    "source": null,
    <% } %>

    <% if (data !== null) { %>
    "data": <%- JSON.stringify(data) %>
    <% } else { %>
    "data": null
    <% } %>
}