var describeContent = function()

in src/Angara.Html/Scripts/Angara.Show.ts [25:40]


var describeContent = function (content: any, typeIdPropertyName: string): ContentDescription {
    if (content === undefined || content === null)
        return descr("Primitive", "");
    if (typeof content[typeIdPropertyName] === "string") {
        var typeId = <string>content[typeIdPropertyName];
        return descr(typeId, typeId);
    }
    if (Array.isArray(content))
        return descr("Seq", "array");
    var tp = typeof (content);
    if (tp === "boolean" || tp === "number" || tp === "string")
        return descr("Primitive", tp)
    if (content instanceof Date)
        return descr("Primitive", "date");
    return descr("Record", "record");
}