tm-content-parser

Trinity Mirror Content Type Parser

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
tm-content-parser
1.0.209 months ago5 years agoMinified + gzip package size for tm-content-parser in KB

Readme

tm-content-parser
This module provides a universal content parser. It only exposes one parse function.

Usage

const contentParser = requrire('tm-content-parser');

contentParser(config, xhtml, content);

Example Config

{
    "contentType":{
        "types":[
            "news",
            "opinion",
            "picture",
            "youtubeVideo",
            "brightcoveVideo",
            "gallery",
            "quiz",
            "html"
        ],
        "disallowedEmbedTypes":[
            "live-event", 
            "news", 
            "opinion"
        ]
    }
}

Release Log

1.0.18 - use newer node version 1.0.17 - pulled AB-700 branch 1.0.15 - extract from tables 1.0.15 - parse html tables, produce new type: table 1.0.11 - not parsing & as this broke urls querystrings.