Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default exports doesn't work #19

Open
ExposedCat opened this issue Aug 6, 2024 · 1 comment
Open

Default exports doesn't work #19

ExposedCat opened this issue Aug 6, 2024 · 1 comment

Comments

@ExposedCat
Copy link

In commonjs projects:

const untruncateJson = require("untruncate-json")
untruncateJson("\\{\\}")

Error: TypeError: untruncateJson is not a function

In esm projects:

import untruncateJson from "untruncate-json"
untruncateJson("\\{\\}")

Error: TypeError: untruncateJson is not a function

It works with .cjs and .esm instead of .js. If you are ok with this I can make a PR

@dphilipson
Copy link
Owner

Huh, you're right, thanks for opening this. I'd be happy to take a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants