@fireproof/core 0.5.14 → 0.5.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fireproof/core",
3
- "version": "0.5.14",
3
+ "version": "0.5.15",
4
4
  "description": "Cloudless database for apps, the browser, and IPFS",
5
5
  "main": "dist/src/fireproof.js",
6
6
  "module": "dist/src/fireproof.mjs",
package/src/db-index.js CHANGED
@@ -144,6 +144,8 @@ export class DbIndex {
144
144
  this.mapFn = mapFn
145
145
  this.mapFnString = mapFn.toString()
146
146
  }
147
+ const matches = /=>\s*(.*)/.exec(this.mapFnString)
148
+ this.includeDocsDefault = matches && matches.length > 0
147
149
  this.name = name || this.makeName()
148
150
  }
149
151
 
@@ -157,7 +159,6 @@ export class DbIndex {
157
159
  return this.mapFnString
158
160
  } else {
159
161
  // it's a consise arrow function, match everythign after the arrow
160
- this.includeDocsDefault = true
161
162
  return matches[1]
162
163
  }
163
164
  }