From ff4f0b7e065a9c44b1d7283ea09562b45937acbe Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 07:40:33 +0000 Subject: [PATCH] Add named export for ESM compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #41 — `import { IPData } from 'ipdata'` now works alongside the existing default export and `require('ipdata')`. https://claude.ai/code/session_01UabaLo3R3sXovyxaZo2yCF --- src/ipdata.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ipdata.ts b/src/ipdata.ts index bee749a..abe686c 100644 --- a/src/ipdata.ts +++ b/src/ipdata.ts @@ -135,7 +135,7 @@ export interface LookupResponse { status: number; } -export default class IPData { +export class IPData { apiKey: string; baseUrl: string; cache: LRUCache; @@ -255,3 +255,5 @@ export default class IPData { return responses; } } + +export default IPData;