Comparing version 5.9.1 to 5.9.2
@@ -510,3 +510,3 @@ <a name="Enmap"></a> | ||
### enmap.export() ⇒ <code>string</code> | ||
Exports the enmap data to a JSON file. | ||
Exports the enmap data to stringified JSON format. | ||
**__WARNING__**: Does not work on memory enmaps containing complex data! | ||
@@ -513,0 +513,0 @@ |
{ | ||
"name": "enmap", | ||
"version": "5.9.1", | ||
"version": "5.9.2", | ||
"description": "A simple database wrapper to make sqlite database interactions much easier for beginners, with additional array helper methods.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -479,2 +479,17 @@ declare module 'enmap' { | ||
/** | ||
* Exports the enmap data to stringified JSON format. WARNING: Does not work on memory enmaps containing complex data! | ||
* @returns The enmap data in a stringified JSON format. | ||
*/ | ||
public export(): string; | ||
/** | ||
* Import an existing json export from enmap from a string. This data must have been exported from enmap, and must be from a version that's equivalent or lower than where you're importing it. | ||
* @param data The data to import to Enmap. Must contain all the required fields provided by export() | ||
* @param overwrite Defaults to true. Whether to overwrite existing key/value data with incoming imported data | ||
* @param clear Defaults to false. Whether to clear the enmap of all data before importing (WARNING: Any exiting data will be lost! This cannot be undone.) | ||
* @returns The enmap. | ||
*/ | ||
public import(data: string, overwrite?: boolean, clear?: boolean): this; | ||
/** | ||
* Initialize multiple Enmaps easily. | ||
@@ -481,0 +496,0 @@ * @param names Array of strings. Each array entry will create a separate enmap with that name. |
Sorry, the diff of this file is too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2
2
3432120
16
16032