Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
const db = require("emo-db");
// GET Data Some How | You Need To Replace It With Your Data
const data = getDataSomeHow();
// Set Property | Key - String | Value - Any (Object, Array, String, ...)
db.set("John", data);
db.set("John-2", data);
db.set("Balance", data.balance);
db.set("Fruits", data.fruits);
db.set("Temporary-Data", data.temp);
// Delete Property | Key - String
db.remove("Temporary-Data");
// Fetch Property | Key - String | Alias - get
db.fetch("John");
db.get("John");
// Check If Property Exists | Key - String | Lodash GET - False
db.has("John");
// Add Value To Property | Key - String | Property Value Type - Number | Value - Number
db.add("Balance", 100);
// Subtract Value From Property | Key - String | Property Value Type - Number | Value - Number
db.subtract("Balance", 100);
// Push Element To Array-type Property | Key - String | Property Value Type - Array | Value - Any (Object, Array, String, ...)
db.push("Fruits", "Apple");
db.push("Fruits", "Banana", "Orange");
// Filter Specific Properties From Database | Func - Function | Type - Array (Default) Or Object
db.filter((element) => element.key.startsWith("John"));
db.filter((element) => element.key.startsWith("John"), "Object");
// Be Careful With value Property, It Can Be Any (Object, Array, String, ...) So Check Type Before Checking Anything
db.filter((element) => typeof element.value === "number");
db.filter((element) => typeof element.value === "number" && element.value === 0);
// GET All Properties From Database | Type - Array (Default) Or Object
db.all();
db.all("Object");
// Clear Database
db.clear();
// Destroy Database (Clear Database & Delete Database File)
db.destroy();
const db = require("emo-db");
const data = getDataSomeHow();
// Set Whole Database File Content Into Provided JSON Content
db.__set({});
// Read Whole Database File Content
db.__read();
// Delete Whole Database File (Content Too)
db.__delete();
// Throw An Error Using emo-db
db.__err("Fake Error Message From emo-db NPM Package");
// FS (File System) Package
db.fs.readFileSync(options);
db.fs.writeFileSync(options);
db.fs.unlinkSync(options);
Note: I Didn't Created This Fully By Myself & It's NOT For Huge Projects
Thank You For Reading & Using This Package ;)
FAQs
JSON Based Database, Specifically For Normal Discord Bots
The npm package emo-db receives a total of 0 weekly downloads. As such, emo-db popularity was classified as not popular.
We found that emo-db demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.