Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aicore/coco-db-client

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aicore/coco-db-client - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "@aicore/coco-db-client",
"version": "1.0.6",
"version": "1.0.7",
"description": "JS client for cocoDb",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -29,2 +29,32 @@ import {httpGet, httpPut} from "./client.js";

/**
* It creates a database with the name provided in the databaseName parameter
* @param{string} databaseName - The name of the database you want to create.
* @returns{Promise<boolean>} A promise
*/
export function createDb(databaseName) {
if (isStringEmpty(databaseName)) {
throw new Error('Please provide valid dataBaseName');
}
return httpPut('/createDb', {
databaseName: databaseName
});
}
/**
* It deletes the database with the given name
* @param{string} databaseName - The name of the database to be deleted.
* @returns{Promise<boolean>} A promise.
*/
export function deleteDb(databaseName) {
if (isStringEmpty(databaseName)) {
throw new Error('Please provide valid dataBaseName');
}
return httpPut('/deleteDb', {
databaseName: databaseName
});
}
/**
* It takes a table name and a document as input and returns a promise

@@ -31,0 +61,0 @@ * @param tableName - The name of the table you want to put the document in.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc