Comparing version 0.1.7 to 0.1.8
27
index.js
@@ -36,9 +36,28 @@ 'use strict' | ||
* | ||
* @prop {Object} | ||
* @property {Object} | ||
* @readonly | ||
*/ | ||
this._options = Object.assign({ | ||
/** | ||
* The name of the application running Bouillon. | ||
* | ||
* @property {string} | ||
* @readonly | ||
*/ | ||
name: 'bouillion-app', | ||
cwd: utils.getCWD(), | ||
autosave: true, | ||
/** | ||
* The location to save the storage file. | ||
* | ||
* @property {string} | ||
* @readonly | ||
*/ | ||
cwd: process.cwd(), | ||
/** | ||
* Indicates whether the data should save to disk after it is saved locally. | ||
*/ | ||
autosave: false, | ||
}, options); | ||
@@ -50,3 +69,3 @@ | ||
* | ||
* @prop {Object} | ||
* @property {Object} | ||
* @readonly | ||
@@ -53,0 +72,0 @@ */ |
{ | ||
"name": "bouillon", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "Simple JSON storage API for working with persistent data in various types of Node applications.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
20
utils.js
@@ -33,22 +33,4 @@ 'use strict' | ||
}, | ||
/** | ||
* Get the current working directory of the application. | ||
* | ||
* This is used if the user does not pass in a cwd in the options | ||
* when initializing Bouillon. | ||
* | ||
* @since 0.1.0 | ||
* | ||
* @returns {string} The current working directory of the user's application. | ||
*/ | ||
getCWD() { | ||
let dir = module.parent.filename.split('\\'); | ||
dir.pop(); | ||
return dir.join('\\'); | ||
} | ||
} |
25590