Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmltojson

Convert HTML page parts provided in an Object Array into JSON objects:

Installation

npm install htmltojson

Usage

const htmltojson = require('../lib/htmltojson');

const converted = htmltojson.convert('HTML-STRING', {
    tags: ['table', 'ol', 'ul']
})

console.log(converted)

// Result:
{
    table: [
        0: [...]
        1: [...]
        2: [...]
    ],
     ol: [
        0: [...]
        1: [...]
        2: [...]
    ],
    ul: [
         0: [...]
         1: [...]
         2: [...]
    ]
}

Abstraction

Providing an Abstraction layer for implementing own "toJson"-conversions. Once a reference to htmltojson is defined a package can extend AbstractToJson and must implement the two methods convert and convertUrl.

About

Convert HTML page parts into JSON objects

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages