@buttercup/exporter

1.1.0 • Public • Published

Buttercup Exporter

Export Buttercup vaults

Build Status npm version

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.

Package Sidebar

Install

npm i @buttercup/exporter

Weekly Downloads

13

Version

1.1.0

License

MIT

Unpacked Size

11.2 kB

Total Files

10

Last publish

Collaborators

  • perrymitchell
  • sallar