'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;
