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

How to use the library with TypeScript ESM? #109

Open
jeanmatthieud opened this issue Oct 18, 2023 · 1 comment
Open

How to use the library with TypeScript ESM? #109

jeanmatthieud opened this issue Oct 18, 2023 · 1 comment

Comments

@jeanmatthieud
Copy link

Hi,

I'm trying to use the library with a node ESM package.
I'm sure that I'm missing something, but I cannot make lora-packet work with ESM and TypeScript.

Could it be possible to create an ESM release of lora-packet ?

jeanmatthieud added a commit to jeanmatthieud/lora-packet that referenced this issue Oct 18, 2023
@diegofcornejo
Copy link

@jeanmatthieud just import like ESM

import * as lorapacket from 'lora-packet';
const packet = lorapacket.fromWire(Buffer.from('your-buffer-data', 'hex'));

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