mobiletto 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,7 +17,7 @@ Today the supported drivers are:
17
17
  * [Mobiletto on npm](https://www.npmjs.com/package/mobiletto)
18
18
 
19
19
  ## TLDR
20
- A simple CRUD example using the mobiletto S3 driver.
20
+ A simple CRUD example using the mobiletto `s3` driver.
21
21
 
22
22
  This code would run the same if the driver were `local`.
23
23
 
@@ -63,7 +63,10 @@ class StorageClient {
63
63
  normalizePath = (path) => path.startsWith(this.baseDir)
64
64
  ? path
65
65
  : this.baseDir + (path.startsWith('/') ? path.substring(1) : path)
66
- denormalizePath = (path) => path.startsWith(this.baseDir) ? path.substring(this.baseDir.length) : path
66
+ denormalizePath = (path) => {
67
+ const norm = path.startsWith(this.baseDir) ? path.substring(this.baseDir.length) : path
68
+ return norm.startsWith('/') ? norm.substring(1) : norm
69
+ }
67
70
 
68
71
  fileToObject = (dir) => (f) => {
69
72
  const stat = fs.lstatSync(dir + '/' + f)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "A storage abstraction layer",
5
5
  "main": "index.js",
6
6
  "author": "Jonathan Cobb",