You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,7 +202,8 @@ Return aggregated statistics about the library dataset, such as total counts of
202
202
203
203
## GET /api/library
204
204
205
-
Lookup one or more libraries by npm package name. Endpoint can optionally perform a quick `check` to return existence flag only.
205
+
Lookup one or more libraries by npm package name.
206
+
Endpoint can optionally perform a quick `check` to return existence flag only, or when `version` is used as `check` value to return the latest version string when package is present in the directory.
206
207
207
208
- Method: GET
208
209
- Path: `/api/library`
@@ -213,6 +214,7 @@ Lookup one or more libraries by npm package name. Endpoint can optionally perfor
213
214
### Notes
214
215
215
216
- If `check` is `true`, the response includes only information about existence for the specified package(s).
217
+
- If `check` is `version`, the response includes only information about existence for the specified package(s), returning the latest version if package exists.
216
218
- If `check` is `false` or not provided, the response includes full library data.
217
219
218
220
### Example
@@ -311,6 +313,16 @@ Lookup one or more libraries by npm package name. Endpoint can optionally perfor
0 commit comments