Closed stevage closed 8 months ago
I have no idea what's going on here. Installed 0.1.0 in a brand new NPM module on macOS.
My code is:
import SPL from 'spl.js'; SPL().then((spl) => spl.db());
Running with node 18.19.0:
$ node test.js file:///Users[redacted].../test/node_modules/spl.js/dist/spl-web.js:2 function e(e){let f=e.length;for(;--f>=0;)e[f]=0}const f=256,n=286,t=30,a=15,q=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),v=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r=new Array(576);e(r);const o=new Array(60);e(o);const X=new Array(512);e(X);const P=new Array(256);e(P);const p=new Array ...
many pages of this output is dumped to stderr. Very weird. I've never seen anything like it.
I get the same result in Node 16 and with Bun.
It looks like you are loading the browser version. There is an .mjs module in the dist folder: https://github.com/jvail/spl.js/blob/a7394ed40a5ebbde841bcf2b551b1e32c864a7ea/test/node.js#L10
I have no idea what's going on here. Installed 0.1.0 in a brand new NPM module on macOS.
My code is:
Running with node 18.19.0:
many pages of this output is dumped to stderr. Very weird. I've never seen anything like it.
I get the same result in Node 16 and with Bun.