Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
crud-json-array
Advanced tools
This module is creating manipulating JSON array. That is create table, insert, update, select and delete. useful for small data
This module is for creating and manipulating JSON array, i.e create table, insert row, update row, select row and delete row. useful for small data like storing settings on servers
npm i crud-json-array
var DB = require("crud-json-array");
var curDB = new DB.CRUD();
curDB.create_database("test");
curDB.create_table("fTable",["name", "age", "sex"]);
Each instance of this module produces only one table i.e table_name.json
//below exmple shows way to create three table in side folder data
var DB = require("crud-json-array");
var curTable_1 = new DB.CRUD("data");
curTable_1.create_table("fTable",["name", "age", "sex"]);
var curTable_2 = new DB.CRUD("data");
curTable_2.create_table("fTable",["paper1", "paper2", "paper3"]);
var curTable_3 = new DB.CRUD("data);
curTable_3.create_table("fTable",["taet1", "test2", "test3"]);
{
"array" : [
["Name", "Age", "Sex" ] //first row i.e 0 index is name of column
,["Raju", 18, "Male"]
,["Mangala", 34, "Female"]
]
}
curDB.insert_one_row(["Rithik", 47, "male"]);
curDB.insert_one_row(["Varun", 27, "male"]);
var index = curDB.find_one_row([0,"Rithik"]);//0 is for column index
console.log(index);
curDB.update_one_row(["Raman", 18, "Male"], [0, "Rithik"]); //0 is for column index
curDB.delete_one_row([0, "Umesh"]);
Two ways to read
1. from file `var tableFile = curDB.read_table_from_file();`
2. from memory `var tableMemory = curDB.read_table_in_memory()`
use in Momery method, avoid from file method
curDb.get_table_full_path_name();
curDB.write_full_table_in_bulk(curTable)// curtable is array conataing
FAQs
This module is creating manipulating JSON array. That is create table, insert, update, select and delete. useful for small data
We found that crud-json-array 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.