4 Commits

Author SHA1 Message Date
Blake Joynes
9e1e65205c fix linting 2024-10-04 01:58:25 -04:00
Blake
6157405fe1 Merge pull request #59 from fadhilx/main
Fix images array is empty because languages equal to undefined on URLSearchParams
2024-10-04 01:54:06 -04:00
Fadhil Ahmad
eaa5f9a751 fix: images is empty because languages undefined on querystring 2024-10-02 12:36:51 +08:00
Blake
2abf448bb2 Merge pull request #57 from blakejoy/test-build
test license changes
2024-06-09 17:03:49 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "tmdb-ts",
"version": "2.0.0",
"version": "2.0.1",
"description": "TMDB v3 library wrapper",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,4 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
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()
: '';
}