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

croxydb

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

croxydb - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

4

adapters/mongo/index.js

@@ -89,3 +89,3 @@ "use strict";

if(db.includes(".")) {
let content = this.get(db.split(".").shift());
let content = await this.get(db.split(".").shift());
if(!content) return true;

@@ -204,3 +204,3 @@ const newContent = Object.assign({}, content);

if(this.get(db)) {
arr = this.get(db);
arr = await this.get(db);
}

@@ -207,0 +207,0 @@

@@ -19,19 +19,34 @@ const langs = ["tr", "en"];

mongoOptions: this.mongoOptions || {},
isMongoSpecialSchema: this.isMongoSpecialSchema
isMongoSpecialSchema: this.isMongoSpecialSchema,
checkUpdates: this.checkUpdates || true
}
this.message = this.lang ? require(`../language/${this.lang.toLowerCase()}.json`) : require(`../language/en.json`);
this.adapter = adapter.set ? adapter : (this.mongo ? new adapter(this.options.mongoOptions) : new adapter(this.options));
try {
fetch("https://registry.npmjs.org/croxydb/latest").then(async(res) => {
res.json().then((data) => {
if(require("../package.json").version !== data.version) {
console.warn(this.message["errors"]["oldVersion"])
}
})
})
} catch (err) {
if(this.checkUpdates) {
try {
fetch("https://registry.npmjs.org/croxydb/latest").then(async(res) => {
res.json().then((data) => {
if(require("../package.json").version !== data.version) {
console.warn(this.message["errors"]["oldVersion"])
}
})
})
} catch (err) {
}
}
},
setCheckUpdates(a) {
if(a === true) {
this.checkUpdates = true;
this.setOptions();
return a;
} else {
this.checkUpdates = false;
this.setOptions();
return false;
}
},
setLanguage(lang) {

@@ -38,0 +53,0 @@ this.lang = lang ? (langs.includes(lang.toLowerCase()) ? lang.toLowerCase() : "en") : "en";

@@ -40,3 +40,3 @@ {

},
"version": "0.0.20"
"version": "0.0.21"
}

@@ -5,4 +5,5 @@ # CroxyDB

# What's new in 0.0.20?
- Fixed bugs in "db.has()" function.
# What's new in 0.0.21?
- Added "db.setCheckUpdates()" function.
- Fixed bugs in "db.delete()" and "db.push()" functions.

@@ -94,2 +95,3 @@ Examples

db.setFile("db") // You can set database file name
db.setCheckUpdates(true) // It warns you if any updates happens.

@@ -96,0 +98,0 @@ db.set("x.y.z", "abc") // abc

@@ -14,2 +14,3 @@ interface QuickDB {

setLanguage:(language:"tr"|"en") => true;
setCheckUpdates:(boolean:boolean) => boolean;
setReadable:(readable:boolean) => boolean;

@@ -16,0 +17,0 @@ setNoBlankData:(noBlankData:boolean) => boolean;

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