convert opml to json.
npm install opml-to-jsonConvert OPML to JSON(JavaScript Object).
`` sh`
npm install opml-to-json
Example OPML file.
` xml`
`js
import { opmlToJSON } from "opml-to-json";
const json = await opmlToJSON(xml);
const expected = {
"title": "title",
"children": [
{
"text": "H1", "children": [
{ "text": "H2 Text" },
{
"text": "H2", "children": [
{ "text": "text" }
]
}
]
},
{ "text": "H1 text" }
]
};
assert.deepStrictEqual(json, expected);
`
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request :D
MIT