Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ Return a list of libraries from the dataset. Supports sorting, full-text search,
- `search` - full-text search string (`relevance` sorting is used automatically when searching).
- `owner` - filter by owner name.
- `topic` - filter by topic or tag.
- Platform support filters (booleans): `ios`, `android`, `web`, `windows`, `macos`, `expoGo`, `fireos`, `horizon`, `tvos`, `visionos`, `vegaos`.
- Platform support filters (booleans): `ios`, `android`, `web`, `windows`, `macos`, `expoGo`, `fireos`, `harmony`, `horizon`, `tvos`, `visionos`, `vegaos`.
- Feature filters (booleans): `hasExample`, `hasImage`, `hasTypes`, `hasNativeCode`, `configPlugin`.
- Quality filters (booleans): `isMaintained`, `isPopular`, `wasRecentlyUpdated`.
- Architecture filters (booleans): `newArchitecture`, `expoModule`, `nitroModule`, `turboModule`.
- Skip categories (booleans): `skipLibs`, `skipTools`, `skipTemplates`.
- Skip categories (booleans): `skipLibs`, `skipTools`.
- Numeric filters: `minPopularity`, `minMonthlyDownloads`.
- `nightlyProgram` - boolean flag for Nightly Program participation.
- `dev` - boolean flag to filter out Development Tools only.
- `bookmarks` - when set, the server reads browser cookie bookmarks and returns only bookmarked libraries (see Notes below).
- Pagination: `offset` (number, default `0`), `limit` (number, default `20`).

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"visionos": false,
"expoGo": false,
"fireos": false,
"harmony": false,
"horizon": false,
"vegaos": false,
"newArchitecture": false,
Expand Down
4 changes: 4 additions & 0 deletions components/Filters/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export const FILTER_STATUS: FilterParamsType[] = [
param: 'wasRecentlyUpdated',
title: 'Recently updated',
},
{
param: 'dev',
title: 'Development Tool',
},
];

export const FILTER_COMPATIBILITY: FilterParamsType[] = [
Expand Down
1 change: 1 addition & 0 deletions pages/api/libraries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
newArchitecture: parsedQuery.newArchitecture,
skipLibs: parsedQuery.skipLibs,
skipTools: parsedQuery.skipTools,
dev: parsedQuery.dev,
expoModule: parsedQuery.expoModule,
nitroModule: parsedQuery.nitroModule,
turboModule: parsedQuery.turboModule,
Expand Down
1 change: 1 addition & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type Query = {
harmony?: string;
web?: string;
windows?: string;
dev?: string;
order?: QueryOrder;
direction?: QueryOrderDirection;
search?: string;
Expand Down
5 changes: 5 additions & 0 deletions util/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export function handleFilterLibraries({
minPopularity,
minMonthlyDownloads,
newArchitecture,
dev,
skipLibs,
skipTools,
expoModule,
Expand Down Expand Up @@ -161,6 +162,10 @@ export function handleFilterLibraries({
return false;
}

if (dev === 'true' && !library.dev) {
return false;
}

for (const param of SUPPORT_PARAMS) {
if (support[param] === 'true' && !library[param as keyof LibraryType]) {
return false;
Expand Down