From abde101e3491089c1264f3f4247deec7b498cb31 Mon Sep 17 00:00:00 2001 From: Arvind Ravulavaru Date: Thu, 26 Jun 2014 18:00:33 +0530 Subject: [PATCH] Udpated docs --- README.md | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0becc5d..5824c9f 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,20 @@ This will check for a directory at given path, if it does not exits, diskDB will If the directory exists but the file/collection does not exist, diskDB will create it for you. +**Note** : If you have manually created an empty JSON file, please make sure that it contains at least an empty array. + +```js +[] +``` +Else it will throw an error like + +```bash +undefined:0 + +^ +SyntaxError: Unexpected end of input +``` + ### Load Collections Alternatively you can also load collections like diff --git a/package.json b/package.json index 5bc5d6a..436f322 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "diskdb", - "version": "0.1.11", + "version": "0.1.12", "main": "lib/diskdb.js", "description": "A Light Weight Disk based JSON Database with a MongoDB like API", "homepage": "http://arvindr21.github.io/diskDB",