@onehat/data 1.22.42 → 1.22.43

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": "@onehat/data",
3
- "version": "1.22.42",
3
+ "version": "1.22.43",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/OneHatData.js CHANGED
@@ -592,13 +592,13 @@ export class OneHatData extends EventEmitter {
592
592
  * Get Repositories that share the given type
593
593
  * @return {Repository[]} repositories
594
594
  */
595
- getRepositoriesByType = (type) => {
595
+ getRepositoriesByType = (type, firstOnly = false) => {
596
596
  if (this.isDestroyed) {
597
597
  throw new Error('this.getRepositoriesByType is no longer valid. OneHatData has been destroyed.');
598
598
  }
599
599
  return this.getRepositoriesBy((repository) => {
600
600
  return repository.getType() === type;
601
- });
601
+ }, firstOnly);
602
602
  }
603
603
 
604
604
  /**