Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
barcode-js
Advanced tools
Barcode Xpress for Node.js enables developers to add the ability to read common industry 1D and 2D barcodes in their applications.
node -v
)Although Barcode Xpress for Node.js may run, it is not supported on earlier operating system versions (for example, Ubuntu 14.04 or Windows 7).
// Import packages.
const bx = require("barcode-js");
// Set up logging function.
const logResults = (results) => console.log(JSON.stringify(results, ["type", "value", "confidence"], 2));
// Set up analysis function.
const analyzeBarcodes = async (filePath) => {
try {
const results = await bx.analyze(filePath);
logResults(results);
}
catch(err) {
console.error(`Fatal: Error analyzing image input\n${err}`);
}
};
// Set up parameters.
// Accepted file types are bmp, tiff, jpg, gif, png, and url
const filePath = "test.bmp";
// Call analyze.
analyzeBarcodes(filePath);
The analyze method returns an array of result objects.
Each result object has the following structure:
{
"type": barcodeType,
"value": barcodeValue,
"area": {
"x": xCoordinateBarcodeStart,
"y": yCoordinateBarcodeStart,
"height": barcodeHeight,
"width": barcodeWidth
},
"corners": [
{
"x": xCoordinateTopLeft,
"y": yCoordinateTopLeft
},
{
"x": xCoordinateTopRight,
"y": yCoordinateTopRight
},
{
"x": xCoordinateBottomRight,
"y": yCoordinateBottomRight
},
{
"x": xCoordinateBottomLeft,
"y": yCoordinateBottomLeft
}
],
"confidence": recognitionConfidence
}
For example, to get the confidence of a recognized barcode:
const barcodeValue = result.confidence;
or to get the height property of a recognized barcode:
const barcodeHeight = result.area.height;
Barcode Xpress for Node.js comes with an evaluation license pre-installed, so you can get started right away.
For development and deployment licenses, and more information on licensing in general, please visit our online documention at https://help.accusoft.com/BarcodeXpress/v13.9/BxNodeJs/webframe.html.
In order to run the license manager, you will need:
java -version
JRE 1.8 or later.Barcode Xpress also includes detailed API documentation and a Getting Started guide.
Need more documentation? Check out the User's Guide
:
https://help.accusoft.com/BarcodeXpress/v13.9/BxNodeJs/webframe.html
Need help? Contact Accusoft at sales@accusoft.com.
FAQs
A node addon to perform barcode recognition and analysis
We found that barcode-js 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.