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

crud-json-array

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crud-json-array - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

js-dist/create.js

@@ -28,4 +28,4 @@ "use strict";

fs.writeFileSync(this.full_table_name, JSON.stringify({ array: [cols] }));
this.read_table_from_file();
}
this.read_table_from_file();
};

@@ -44,3 +44,3 @@ Create.prototype.read_table_from_file = function () {

};
Create.prototype.insert_row = function (row) {
Create.prototype.insert_one_row = function (row) {
// code to insrt row

@@ -47,0 +47,0 @@ this.table.push(row);

{
"name": "crud-json-array",
"version": "0.0.2",
"version": "0.0.3",
"description": "This module is creating manipulating JSON array. That is create table, insert, update, select and delete. useful for small data",

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

@@ -41,6 +41,23 @@ # crud-json-array

```
## Code to create more than one table
```
//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"]);
```
## insert row
```
curDB.insert_row(["Rithik", 47, "male"]);
curDB.insert_row(["Varun", 27, "male"]);
curDB.insert_one_row(["Rithik", 47, "male"]);
curDB.insert_one_row(["Varun", 27, "male"]);
```

@@ -63,9 +80,11 @@

## read table (all)
Two way to read
1. from file `var tableFile = curDB.read_table_from_file();`
2. from memory `var tableMemory = curDB.read_table_in_memory()`
Two way 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 as avoid from file method
use in Momery as avoid from file method
## get table name with path
```
curDb.get_table_full_path_name
```

@@ -39,4 +39,4 @@ /*

fs.writeFileSync(this.full_table_name, JSON.stringify({array : [cols]}));
this.read_table_from_file();
}
this.read_table_from_file();
}

@@ -59,3 +59,3 @@

insert_row(row:any[]){
insert_one_row(row:any[]){
// code to insrt row

@@ -108,5 +108,12 @@ this.table.push(row);

get_table_full_path_name(){
// returns this path and table name
return this.full_table_name;
}
}

Sorry, the diff of this file is not supported yet

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