@muze-nl/jsfs-solid 0.2.0 → 0.2.2

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/dist/browser.js CHANGED
@@ -8128,7 +8128,7 @@
8128
8128
  result2 += "/";
8129
8129
  }
8130
8130
  }
8131
- return result2;
8131
+ return "" + result2;
8132
8132
  }
8133
8133
  static isAbsolute(path) {
8134
8134
  if (path instanceof _Path) {
@@ -14439,6 +14439,12 @@
14439
14439
  }
14440
14440
  function groupBy(data, pointerFunctions) {
14441
14441
  let pointerFn = pointerFunctions.shift();
14442
+ if (typeof pointerFn == "string") {
14443
+ pointerFn = _[pointerFn];
14444
+ }
14445
+ if (typeof pointerFn != "function") {
14446
+ throw new Error("groupBy parameters must be either a property name or a pointer function (e.g.: _.name)");
14447
+ }
14442
14448
  let groups = getMatchingGroups(data, pointerFn);
14443
14449
  if (pointerFunctions.length) {
14444
14450
  for (let group in groups) {
@@ -14770,7 +14776,7 @@
14770
14776
  #path;
14771
14777
  constructor(metroClient, path = "/", solidConfiguration = {}) {
14772
14778
  metroClient = client(metroClient).with(browser_default.oidcmw(solidConfiguration)).with(src_default3(solidConfiguration));
14773
- path = new Path(path);
14779
+ path = Path.collapse(path);
14774
14780
  super(metroClient, path);
14775
14781
  this.#client = metroClient;
14776
14782
  this.#path = path;
@@ -14779,7 +14785,7 @@
14779
14785
  return "SolidAdapter";
14780
14786
  }
14781
14787
  async read(path) {
14782
- let response2 = await this.#client.get(path);
14788
+ let response2 = await this.#client.get(Path.collapse(path, this.#path));
14783
14789
  let result2 = {
14784
14790
  type: this.getMimetype(response2),
14785
14791
  name: Path.filename(path),