UNPKG

bfx-hf-models-adapter-lowdb

Version:
12 lines (11 loc) 206 B
/** * Creates an empty map at the path if none exists * * @param {LowDB} db * @param {string} path */ module.exports = (db, path) => { if (!db.get(path).value()) { db.set(path, {}).write() } }