1 | import { npmRegistryDownloadsAPI } from '../data/registries';
|
2 | import { fetchFromRegistry } from './fetch-from-registry';
|
3 |
|
4 | export async function fetchDownloadsFromRegistry<T>({
|
5 | endpoint,
|
6 | registryDownloadsAPI = npmRegistryDownloadsAPI,
|
7 | cached,
|
8 | }: {
|
9 | endpoint: string;
|
10 | registryDownloadsAPI?: string;
|
11 | cached?: boolean;
|
12 | }): Promise<T> {
|
13 | return fetchFromRegistry({
|
14 | endpoint,
|
15 | registry: registryDownloadsAPI,
|
16 | mirrors: [],
|
17 | cached,
|
18 | });
|
19 | }
|