Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Error when Importing + Proposed fix #26

@dgabrahams

Description

@dgabrahams

I am currently building a React project and using this library. It failed but I got it to work by making one addition to the source code - line 2 of html2json.js now reads:

var DEBUG = false;

Also if you want to update the readme, I used import in this way successfully:

import HTML2json from 'html2json'; var json2HTML = HTML2json.json2html; var html2JSON = HTML2json.html2json;

Then an example of its use:

var res = html2JSON('<div>text</div>');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions