That package can read files from osu folder called osu!.db and collection.db About struct that db look on peppy site: link
Using npm:
$ npm install osu-db-parser
const fs = require("fs");
const OsuDBParser = require("osu-db-parser");
let osuDBbuffer = Buffer.from(fs.readFileSync("<PATH-TO OSU-DB>"));
const osuDB = new OsuDBParser(osuDBbuffer);
let osuDBData = osuDB.getOsuDBData(); // This is osu!.db data you can make with this all that you want.
You can update buffer on fly
let newBuffer = Buffer.from(fs.readFileSync("<PATH-TO OSU-DB>"));
osuDB.setBuffer("osudb", newBuffer);
let newData = osuDB.getOsuDBData();
Similar to how to read osu!.db ;D
const fs = require("fs");
const OsuDBParser = require("osu-db-parser");
let collectionBuffer = Buffer.from(fs.readFileSync("<PATH-TO COLLECTION-DB>"));
const collectionDB = new OsuDBParser(null, collectionBuffer); // Yeah, that's okay
let osuCollectionData = collectionDB.getCollectionData() // This is collection.db data you can make with this all that you want.
And too. You can update buffer on fly
let newBuffer = Buffer.from(fs.readFileSync("<PATH-TO OSU-DB>"));
collectionDB.setBuffer("collection", newBuffer);
let newData = collectionDB.getCollectionData() ;
const fs = require("fs");
const OsuDBParser = require("osu-db-parser");
let osuDBbuffer = Buffer.from(fs.readFileSync("<PATH-TO OSU-DB>"));
let collectionBuffer = Buffer.from(fs.readFileSync("<PATH-TO COLLECTION-DB>"));
const ultimateDB = new OsuDBParser(osuDBbuffer=osuDBbuffer, osuCollectionBuffer=collectionBuffer);
let osuDBData = ultimateDB.getOsuDBData();
let osuCollectionData = ultimateDB.getCollectionData();