UNPKG

bfx-hf-models-adapter-lowdb

Version:
12 lines (11 loc) 213 B
/** * Creates an empty collection 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() } }