bwip-js
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -23,2 +23,4 @@ // file : bwip-js/server.js | ||
console.log('bwip-js', bwipjs.VERSION, 'BWIPP', bwipjs.BWIPP.VERSION); | ||
// Optionally, load custom fonts. This shows how to load the Inconsolata font, | ||
@@ -25,0 +27,0 @@ // supplied with the bwip-js distribution. The path to your fonts will be different. |
{ | ||
"name": "bwip-js", | ||
"version": "2.0.3", | ||
"description": "JavaScript barcode generator supporting over 90 types and standards.", | ||
"main": "./dist/bwip-js.js", | ||
"version": "2.0.4", | ||
"description": "JavaScript barcode generator supporting over 100 types and standards.", | ||
"main": "./dist/node-bwipjs.js", | ||
"browser": "./dist/bwip-js.js", | ||
"bin": { | ||
@@ -7,0 +8,0 @@ "bwip-js": "./bin/bwip-js.js" |
@@ -27,3 +27,3 @@ # // Barcode Writer in Pure JavaScript | ||
* Current bwip-js version is 2.0.3 (2019-12-15) | ||
* Current bwip-js version is 2.0.4 (2019-12-15) | ||
* Current BWIPP version is 2019-11-08 | ||
@@ -30,0 +30,0 @@ * Node.js compatibility: 0.12+ |
@@ -22,10 +22,6 @@ // drawing-zlibpng.js | ||
var PNG_ZLIB = typeof process == 'object' && typeof process.release == 'object' && | ||
process.release.name == 'node' ? require('zlib') : null; | ||
var PNG_ZLIB = require('zlib'); | ||
// opts is the same options object passed into the bwipjs methods. | ||
function DrawingZlibPng(opts, callback) { | ||
if (!PNG_ZLIB) { | ||
throw new Error('Not running in node.js'); | ||
} | ||
var image_buffer, image_width, image_height; | ||
@@ -32,0 +28,0 @@ |
// exports.js | ||
//@@BEGIN-NODE-JS-ONLY@@ | ||
var url = require('url'); | ||
// bwipjs.request(req, res [, overrides]) | ||
@@ -11,6 +14,3 @@ // | ||
function Request(req, res, extra) { | ||
if (!Request.url) { | ||
Request.url = require('url'); | ||
} | ||
var opts = Request.url.parse(req.url, true).query; | ||
var opts = url.parse(req.url, true).query; | ||
@@ -72,3 +72,6 @@ // Convert boolean empty parameters to true | ||
} | ||
//@@ENDOF-NODE-JS-ONLY@@ | ||
//@@BEGIN-BROWSER-ONLY@@ | ||
// bwipjs.toCanvas(canvas, options) | ||
@@ -106,2 +109,4 @@ // bwipjs.toCanvas(options, canvas) | ||
//@@ENDOF-BROWSER-ONLY@@ | ||
// bwipjs.fixupOptions(options) | ||
@@ -108,0 +113,0 @@ // |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
6139933
40
114784
1
6