UNPKG

vellin

Version:

Manage your secrets and use them everywhere! Replace your .env files.

21 lines (16 loc) 432 B
// index.js import { setVault, getVault } from "./vault.js"; import { validateKey, validateVal } from "./validate.js"; class Vell { async set(inputKey, secretVal) { if (validateKey(inputKey) && validateVal(secretVal)) { await setVault(inputKey, secretVal); } } async get(inputKey) { if (validateKey(inputKey)) { return await getVault(inputKey); } } } export default Vell;