mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-04-22 10:42:10 +00:00
Fixed browser context and header error
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
f19298e20d
commit
efe5957946
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@tcgdex/sdk",
|
"name": "@tcgdex/sdk",
|
||||||
"version": "2.3.0-beta.1",
|
"version": "2.3.0-beta.1",
|
||||||
"main": "./dist/cjs/tcgdex.js",
|
"main": "./dist/cjs/tcgdex.node.js",
|
||||||
"module": "./dist/modules/tcgdex.js",
|
"module": "./dist/modules/tcgdex.node.js",
|
||||||
"types": "./dist/types/tcgdex.d.ts",
|
"types": "./dist/types/tcgdex.d.ts",
|
||||||
"repository": "https://github.com/tcgdex/javascript-sdk.git",
|
"repository": "https://github.com/tcgdex/javascript-sdk.git",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import TCGdex from './tcgdex'
|
import TCGdex from './tcgdex'
|
||||||
import unfetch from 'unfetch'
|
import unfetch from 'unfetch'
|
||||||
|
|
||||||
TCGdex.fetch = unfetch as any
|
TCGdex.fetch = window.fetch ?? unfetch as any
|
||||||
|
|
||||||
export default TCGdex
|
module.exports = TCGdex
|
||||||
export * from './tcgdex'
|
|
||||||
|
@ -6,7 +6,6 @@ const ENDPOINTS: Array<Endpoint> = ['cards', 'categories', 'hp', 'illustrators',
|
|||||||
const BASE_URL = 'https://api.tcgdex.net/v2'
|
const BASE_URL = 'https://api.tcgdex.net/v2'
|
||||||
export default class TCGdex {
|
export default class TCGdex {
|
||||||
|
|
||||||
|
|
||||||
public static fetch: typeof fetch
|
public static fetch: typeof fetch
|
||||||
|
|
||||||
public static readonly VERSION = "2.2.0"
|
public static readonly VERSION = "2.2.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user