@onurege3467/zerohelper
Version:
ZeroHelper is a versatile JavaScript library offering helper functions and database utilities for developers. It supports MongoDB, MySQL, SQLite, Redis, and PostgreSQL.
10 lines (7 loc) • 312 B
JavaScript
;
const errors = require('../errors/strings.js');
module.exports = async function(dbName){
if(!dbName || typeof dbName !== "string") throw new TypeError(errors.databaseName.replace("{received}", typeof table));
await this.db.query(`CREATE DATABASE IF NOT EXISTS \`${dbName}\``);
return true;
}