bookmark-file-parser
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

bookmark-file-parser

Parse Firefox/Chrome/IE/Safari HTML bookmarks files

install

npm i bookmark-file-parser -S

use

import { parseByPath, parseByString } from "bookmark-file-parser"
import { readFileSync } from "fs"
 
const dirname = "./chrome.html"
 
const data1 = parseByPath(dirname)
 
const content = readFileSync(dirname, "utf-8")
const data2 = parseByString(content)

output

[{
    "name": "chrome",
    "type": "folder",
    "href": "",
    "icon": "",
    "children": [{
        "name": "google",
        "type": "site",
        "href": "https://www.google.com/",
        "icon": "",
        "children": []
    }]
}]  

Package Sidebar

Install

npm i bookmark-file-parser

Weekly Downloads

11

Version

1.0.6

License

MIT

Unpacked Size

95.5 kB

Total Files

10

Last publish

Collaborators

  • hold-baby