Buttercup Exporter
Export Buttercup vaults
About
This library provides methods to allow you to export Buttercup vaults to CSV.
Install by running the following:
npm install @buttercup/exporter --save
Requires NodeJS 10 or later.
Usage
Require the exporter method and pass an archive instance to it:
const fs = require("fs");
const { Archive } = require("buttercup");
const { exportVaultToCSV } = require("@buttercup/exporter");
const archive = new Archive();
archive.createGroup("General")
.createEntry("email")
.setProperty("username", "test@mail.com")
.setProperty("password", "passw0rd");
exportVaultToCSV(archive).then(csv => {
fs.writeFileSync("./test.csv", csv);
});
exportVaultToCSV
takes the vault instance as the only parameter and returns a Promise
.