@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 +1 -1
- package/src/OneHatData.js +2 -2
package/package.json
CHANGED
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
|
/**
|