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

Extract the core into its own module #351

Open
qubyte opened this issue Oct 21, 2023 · 0 comments
Open

Extract the core into its own module #351

qubyte opened this issue Oct 21, 2023 · 0 comments

Comments

@qubyte
Copy link

qubyte commented Oct 21, 2023

The core modules of this package are the best (in quality and maintenance) QR code generating code to be found in the JS ecosystem. It'd be great to have the core in its own package so that it can serve more use cases!

I'm prepared to extract the code into a module myself, but it obviously won't have the momentum that this project has, and I'll have to remember check and port fixes to the core files from this module to that one. It also feels a bit rude to copy-paste such a large chunk of code without at least a heads up.

I'd be happy to do the leg work of extracting the code if you prefer to create a repository to retain ownership. I'm flexible!

Some motivation:

Simple API

Same inputs (perhaps without color and padding etc.), and the return value of createSymbol (perhaps reduced to binary/boolean pixels) out.

Lower dependency footprint

Some (perhaps most) users of this module don't care about the CLI feature, and some (like myself) don't need the PNG or SVG output. Just getting the pixel data out is ideal. My particular use case has a hand-rolled PNG generator designed specifically for QR codes.

CLI libraries like yargs are also a source of frequent security advisories, which mean frequent module upgrade toil. These days I try to keep CLI in a separate package to API wherever possible.

Broader user base

The core could be a de facto standard for more frontends. For example, a terminal frontend, an HTML table (I know, not a good idea) frontend, a DXF frontend for CNC machines, and other options not foreseen.

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

1 participant