Compare commits
4 Commits
test-build
...
feat/2.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e1e65205c | ||
|
|
6157405fe1 | ||
|
|
eaa5f9a751 | ||
|
|
2abf448bb2 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tmdb-ts",
|
"name": "tmdb-ts",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "TMDB v3 library wrapper",
|
"description": "TMDB v3 library wrapper",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
export function parseOptions(options?: Record<string, any>): string {
|
export function parseOptions(options?: Record<string, any>): string {
|
||||||
return options ? new URLSearchParams(Object.entries(options)).toString() : '';
|
return options
|
||||||
|
? new URLSearchParams(
|
||||||
|
Object.entries(options).filter(([, v]) => v) // remove undefined
|
||||||
|
).toString()
|
||||||
|
: '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user