UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

25 lines (19 loc) 460 B
'use strict'; var getDBAsync = require('./getDBAsync.cjs'); var getDBValue = require('./getDBValue.cjs'); // @ts-nocheck function getDBData(data, type) { return new Promise(function (resolve, reject) { // Try try { // Get Data getDBAsync(data, type) .then((final_data) => resolve(getDBValue(final_data))) .catch(reject); } catch (err) { // Error reject(err); } }); } module.exports = getDBData;