You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

node-json-db

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-json-db - npm Package Compare versions

Comparing version

to
0.6.2

2

package.json
{
"name": "node-json-db",
"version": "0.6.1",
"version": "0.6.2",
"description": "Database using JSON file as storage for Node.JS",

@@ -5,0 +5,0 @@ "main": "./JsonDB.js",

@@ -128,2 +128,14 @@ [![Build Status](https://secure.travis-ci.org/Belphemur/node-json-db.png?branch=master)](http://travis-ci.org/Belphemur/node-json-db) [![Coverage Status](https://img.shields.io/coveralls/Belphemur/node-json-db.svg)](https://coveralls.io/r/Belphemur/node-json-db?branch=master)

```
#### Appending in Array
```javascript
//You can also easily append new item to an existing array
//This set the next index with {obj: 'test'}
db.push("/arraytest/myarray[]", {obj:'test'}, true);
//The append feature can be used in conjuction with properties
//This will set the next index as an object {myTest: 'test'}
db.push("/arraytest/myarray[]/myTest", 'test', true);
```
### Exception/Error

@@ -130,0 +142,0 @@ JsonDB use 2 type of Error/Exception :

@@ -348,3 +348,2 @@ var expect = require("expect.js");

expect(array).to.be.an('array');
console.log(array);
var index1 = db.getData('/arraytest/appendArray2[1]/test');

@@ -351,0 +350,0 @@ expect(index1).to.be(1);