informa-db.js
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -1,2 +0,2 @@ | ||
import * as DbUtils from './utils'; | ||
import * as DbUtils from './utils.js'; // eslint-disable-line import/extensions | ||
@@ -3,0 +3,0 @@ if (!window) throw new Error('Running in the wrong environment (Did not find window)'); |
{ | ||
"name": "informa-db.js", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"description": "DataBases made easier", | ||
@@ -5,0 +5,0 @@ "main": "server.js", |
@@ -43,23 +43,23 @@ # Informa-Db.js | ||
## Docs | ||
### `new Db( path<String>, options<Object> )` | ||
#### `options.soc<Boolean>` (Or `options.saveOnChange<Boolean>`) | ||
### `new Db( path<String>, settings<Object> )` | ||
#### `settings.soc<Boolean>` (Or `settings.saveOnChange<Boolean>`) | ||
Whether to save once the value changes | ||
Has to be used with enableThis | ||
#### `options.enableThis<Boolean>` | ||
#### `settings.enableThis<Boolean>` | ||
Whether to return the entire class or only the value. | ||
#### `options.path<String>` | ||
#### `settings.path<String>` | ||
Path to file. | ||
Will throw an error if none provided or if type is incorrect | ||
#### `options.defaultValue<Any>` | ||
#### `settings.defaultValue<Any>` | ||
Default string to write on file if it doesn't exist. | ||
Defaults to `{}` | ||
#### `options.saveSpace<Any>` | ||
Wether to indent on file save | ||
#### `settings.saveSpace<Any>` | ||
Wether not to indent on file save | ||
Defaults to `false` | ||
-- | ||
The following applies only if `options.enableThis` was set to `true` | ||
The following applies only if `settings.enableThis` was set to `true` | ||
#### `this.update()` | ||
Saves `this.value` to the file named `options.path` | ||
Saves `this.value` to the file named `settings.path` | ||
#### `this.value` | ||
@@ -66,0 +66,0 @@ Content of the batabase |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10098