1
0
mirror of https://github.com/lancedikson/bowser synced 2026-10-30 23:37:08 +00:00

fix: expose the constant maps on the ESM namespace (#642)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Denis Demchenko
2026-10-26 21:16:03 +02:00
committed by GitHub
parent 459d9ea318
commit 6ad397ee41
7 changed files with 67 additions and 21 deletions

View File

@@ -39,8 +39,9 @@ import * as Bowser from "bowser"; // TypeScript
import Bowser from "bowser"; // ES6 (and TypeScript with --esModuleInterop enabled)
```
The ES module build also exposes `parse` and `getParser` as named exports, so
you can import just the part you use and let your bundler drop the rest:
The ES module build also exposes `parse`, `getParser`, `BROWSER_MAP`,
`ENGINE_MAP`, `OS_MAP` and `PLATFORMS_MAP` as named exports, so you can import
just the part you use and let your bundler drop the rest:
```javascript
import { getParser, parse } from "bowser";