workshopper-adventure-storage
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "workshopper-adventure-storage", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,3 +40,3 @@ # workshopper-adventure-storage | ||
## storage.save('name', data', cb) | ||
## storage.save('name', data') | ||
JSON encodes and writes a file to the storage directory. The following will | ||
@@ -49,24 +49,17 @@ save the file as `index.json`. | ||
} | ||
storage.save('index', data, (err) => { | ||
if (err) throw err | ||
}) | ||
storage.save('index', data) | ||
``` | ||
## storage.get('name', cb) | ||
## storage.get('name') | ||
Retrieves and unserializes a file from storage. | ||
```js | ||
storage.get('index', (err, data) => { | ||
if (err) throw err | ||
console.log(file) | ||
}) | ||
var data = storage.get('index') | ||
``` | ||
## storage.reset(cb) | ||
## storage.reset() | ||
Clears the storage directory. | ||
```js | ||
storage.reset((err) => { | ||
if (err) throw err | ||
}) | ||
storage.reset() | ||
``` | ||
@@ -73,0 +66,0 @@ |
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
8135
79