braidjs icon indicating copy to clipboard operation
braidjs copied to clipboard

Libraryfied Antimatter for ES6 modules and UMD

Open remaininlight opened this issue 3 years ago • 3 comments

Thanks so much for Antimatter @dglittle and @toomim! Very, very promising

I was wanting to use it with ES6, so I used this framework to turn it into a library: https://www.npmjs.com/package/rollup-boilerplate

Seems to work for me. Also fixed a typo on line 69.

Hope you're both good

remaininlight avatar Feb 01 '22 16:02 remaininlight

Hey @remaininlight! Thanks for your interest in antimatter! Have I met you before? Your username looks familiar.

Making it work in ES6 modules is a great idea. This rollup-boilerplate tool sure generated a lot of code, though, and most of it is for irrelevant stuff like linting. The readme got renamed and an MIT license got added.

I like keeping the antimatter code tidy, because it's designed to be read, not just used. We are putting the algorithm on display. I think ES6 modules can be supported with a lot less code. For braidify, for instance... I basically just added this index.mjs file and this clause in package.json. I think we can do something similar for antimatter, and add ES6 module support with a scalpel.

toomim avatar Feb 02 '22 10:02 toomim

Good catch with the typo on line 69!

toomim avatar Feb 02 '22 10:02 toomim

Is your username @remaininlight related to the talking heads album?

toomim avatar Feb 02 '22 11:02 toomim