@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.
@@ -135,6 +135,8 @@ export class DbIndex {
135
135
  this.mapFn = mapFn;
136
136
  this.mapFnString = mapFn.toString();
137
137
  }
138
+ const matches = /=>\s*(.*)/.exec(this.mapFnString);
139
+ this.includeDocsDefault = matches && matches.length > 0;
138
140
  this.name = name || this.makeName();
139
141
  }
140
142
  makeName() {
@@ -148,7 +150,6 @@ export class DbIndex {
148
150
  }
149
151
  else {
150
152
  // it's a consise arrow function, match everythign after the arrow
151
- this.includeDocsDefault = true;
152
153
  return matches[1];
153
154
  }
154
155
  }
@@ -233,9 +233,9 @@ declare class DbIndex {
233
233
  applyMapFn(mapFn: any, name: any): void;
234
234
  mapFnString: any;
235
235
  mapFn: any;
236
+ includeDocsDefault: boolean;
236
237
  name: any;
237
238
  makeName(): any;
238
- includeDocsDefault: boolean;
239
239
  toJSON(): {
240
240
  name: any;
241
241
  code: any;
@@ -39014,6 +39014,8 @@ class DbIndex {
39014
39014
  this.mapFn = mapFn;
39015
39015
  this.mapFnString = mapFn.toString();
39016
39016
  }
39017
+ const matches = /=>\s*(.*)/.exec(this.mapFnString);
39018
+ this.includeDocsDefault = matches && matches.length > 0;
39017
39019
  this.name = name || this.makeName();
39018
39020
  }
39019
39021
 
@@ -39027,7 +39029,6 @@ class DbIndex {
39027
39029
  return this.mapFnString
39028
39030
  } else {
39029
39031
  // it's a consise arrow function, match everythign after the arrow
39030
- this.includeDocsDefault = true;
39031
39032
  return matches[1]
39032
39033
  }
39033
39034
  }