mugeso / gs1-128-encoder Goto Github PK
View Code? Open in Web Editor NEWA GS1-128 barcode encoder module for JavaScript or TypeScript
A GS1-128 barcode encoder module for JavaScript or TypeScript
Hello, the npm package includes TypeScript code mixed with the js library. Can you republish to exclude the TypeScript code?
As is, it results in errors when importing:
node_modules/gs1-128-encoder/lib/code128.ts:167:30 - error TS2769: No overload matches this call.
Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error.
Argument of type 'number' is not assignable to parameter of type 'ConcatArray<never>'.
Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error.
Argument of type 'number' is not assignable to parameter of type 'ConcatArray<never>'.
167 codes = codes.concat(context.startCode, context.consume(context));
~~~~~~~~~~~~~~~~~
node_modules/gs1-128-encoder/lib/code128.ts:244:11 - error TS2488: Type 'RegExpMatchArray | null' must have a '[Symbol.iterator]()' method that returns an iterator.
244 const [, target, rest] = context.rest.match(/^((?:\d{2}|Ï)+)(.*)$/);
~~~~~~~~~~~~~~~~
node_modules/gs1-128-encoder/lib/code128.ts:255:12 - error TS2531: Object is possibly 'null'.
255 return target.match(/\d{2}|Ï/g).map(mapCToCode);
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/gs1-128-encoder/lib/code128.ts:275:29 - error TS2769: No overload matches this call.
Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error.
Argument of type 'number' is not assignable to parameter of type 'ConcatArray<never>'.
Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error.
Argument of type 'number' is not assignable to parameter of type 'ConcatArray<never>'.
275 return codes.concat(checksum, STOP);
Code table is wrong.
Now support only type C but GS1-128 has applications using alphabet.
Now adds FUNC 1
only after start code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.