1.0.2 • Published 7 months ago

keepo v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

build coverage:functions coverage:statements coverage:lines coverage:branches License

Table of Contents

Features

  • Decrypt and use .keep file
  • Use and manage user secrets easier

Installation

npm install keepo

Usage

After installation Use the snippet blow the get a secret and manage errors:

import { get as keepo, constants } from "keepo";

keepo<T>("<key>")
  .then((value) => {
    // do stuff
  })
  .catch((reason) => {
    if (reason.startsWith("<key>")) {
      // the key was not found
    } else if (reason === constants.nokeeperror) {
      // no .keep file - local or global - was found
    }
  });

or just:

import { get as keepo } from "keepo";

async function my_async_function() {
  const secret = await keepo<T>("key");
  // do stuff
}

License

MIT

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago