mobiletto 1.0.16 → 1.0.17

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.
Files changed (2) hide show
  1. package/index.js +10 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -79,6 +79,16 @@ const UTILITY_FUNCTIONS = {
79
79
  throw e
80
80
  }
81
81
  },
82
+ safeMetadata: (client) => async (path) => {
83
+ try {
84
+ return await client.driver_metadata(path)
85
+ } catch (e) {
86
+ if (e instanceof MobilettoNotFoundError) {
87
+ return null
88
+ }
89
+ throw e
90
+ }
91
+ },
82
92
  remove: (client) => async (path, opts) => {
83
93
  const recursive = opts && opts.recursive ? opts.recursive : false
84
94
  const quiet = opts && opts.quiet ? opts.quiet : false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "A storage abstraction layer",
5
5
  "main": "index.js",
6
6
  "author": "Jonathan Cobb",