4 ms·
Does it work with ESM ? Like: > import { kvjs } from '@heyputer/kv.js' If it does you could add an example in the readme to make that clear. I try to avoid co
by simlevesque 3y ago
Does it work with ESM ? Like:
> import { kvjs } from '@heyputer/kv.js'
If it does you could add an example in the readme to make that clear. I try to avoid commonjs-only modules nowadays.
Edit: Also, is it really a single source file or it's compiled ? It'd be hard to code review this 2.6k lines file.
- kerneldeimos 3y agoIsn't one of the merits of ESM that it can import either? I believe this is supposed to work: import theDefaultExport from '@heyputer/kv.js';
- spankalee 3y agoBrowsers can not import CommonJS
- jsf01 3y agoI’ll admit I only skimmed it for a few minutes but I found the code really nice to read through! I highly doubt it is compiled output. When the entire code base essentially just consists of a single data structure I think that a single file, even if it is long, is perfectly appropriate. What I’d suggest for reviewing it is to code fold all the methods in your editor and then expand each one as you get to it. Props to the author for such an elegant implementation.