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

magmadb

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magmadb - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

16

Components/Database.js

@@ -7,3 +7,3 @@ const Collection = require("./Collection");

#collections
constructor(name) {
constructor(name="defaultdb") {
this.name = name;

@@ -22,3 +22,3 @@ this.#collections = [];

CreateCollection(name) {
CreateCollection(name="defaultcollection") {
try {

@@ -54,7 +54,9 @@ this.#DbExists(this.dbFile);

let index = this.#collections.indexOf(collection);
if(index != -1) this.#collections.splice(index, 1);
collection.destroyed = true;
delete db[collection.name || collection];
fs.writeFileSync(this.dbFile, JSON.stringify(db));
return db;
if(index != -1) {
this.#collections.splice(index, 1);
collection.destroyed = true;
delete db[collection.name || collection];
fs.writeFileSync(this.dbFile, JSON.stringify(db));
return db;
} else return null;
} catch(err) {

@@ -61,0 +63,0 @@ return null;

{
"name": "magmadb",
"version": "1.1.1",
"version": "1.1.2",
"description": "Magmadb, a user-friendly solution for storing and accessing data.",

@@ -5,0 +5,0 @@ "main": "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