
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
ts-barcode-generator
Advanced tools
Simple barcode generator for frameworks like React, Preact, Qwik, Svelte, etc.
Created to be lightweight and easy to use.
Generated 1D barcodes can be resized freely horizontally and vertically. By default, they will take on the size of the parent element. QR codes will be scalable, preserve aspect ratio and their size also depends on width of parent element.
Whether the project will be developed further depends on my willingness to work. EAN13 might be the only supported format.
There was no browser API that I could use for generating 1D/2D barcodes in my projects. Among the libraries available on NPM, I found only one decent library that is written in pure JavaScript - bwip-js, which unfortunately does not have tree shaking. Bundled in my Vite project it takes about 230 kilobytes Gzipped.
So, as part of my TypeScript learning journey (and programming in general), I decided to see if I could create such a generator with the help of ChatGPT and GitHub Copilot. At the beginning, I will focus on the most important types of codes for me: EAN13 and QR.
import TsBarcodeGenerator from 'ts-barcode-generator';
const barcode = TsBarcodeGenerator.generate('7423522549551', 'EAN13');
console.log(barcode);
import TsBarcodeGenerator from 'ts-barcode-generator';
export const YourComponent = () => {
const barcode = TsBarcodeGenerator.generate('7423522549551', 'EAN13');
return (
<div className='p-6 bg-white fill-current text-black'>
<div dangerouslySetInnerHTML={{ __html: barcode }} />
</div>
);
};
If you see potential in this project and want to help - feel free to contribute. Any help is welcome.
You can contact me on Discord: avaray_
You can find me on servers like: Astro Lounge, Anthony's, Programowanko TSH.io.
FAQs
Simple Barcode Generator created in TypeScript
The npm package ts-barcode-generator receives a total of 0 weekly downloads. As such, ts-barcode-generator popularity was classified as not popular.
We found that ts-barcode-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.