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

bionicdb

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bionicdb - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

22

dist/db/bionic.js

@@ -38,6 +38,15 @@ "use strict";

};
this.collection = (name) => {
this.collection = (name) => __awaiter(this, void 0, void 0, function* () {
this.path = this.dbname + '/' + name + ".json";
try {
let result = yield this.fileExist(this.path);
if (result && result.status == 404) {
yield this.createFile(this.path);
}
}
catch (error) {
return { status: 404, msg: 'erro in created file path' };
}
return new collection_1.ColletionMap(this);
};
});
this.fileExist = (path) => __awaiter(this, void 0, void 0, function* () {

@@ -54,11 +63,2 @@ this.path = path;

this.insertOne = (data) => __awaiter(this, void 0, void 0, function* () {
try {
let result = yield this.fileExist(this.path);
if (result && result.status == 404) {
yield this.createFile(this.path);
}
}
catch (error) {
return { status: 404, msg: 'erro in created file path' };
}
const result = yield this.insertToOne(data);

@@ -65,0 +65,0 @@ return result ? result : { status: 404, msg: 'erro in add path' };

@@ -15,5 +15,5 @@ const { Bionic } = require('./dist/index');

(async function(){
const db = bionic.db('superchats')
let collection = await db.deleteDB()
const db = bionic.db('brb')
let collection = await db.collection('teste')
})();
{
"name": "bionicdb",
"version": "0.0.1",
"version": "0.0.2",
"description": "database modern",

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

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