Socket
Socket
Sign inDemoInstall

bitgener

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

5

CHANGELOG.md
# CHANGELOG
## 1.1.0 - delivery @14/08/2019
- fix settings to be set with undefined values if missing
- fix settings of type number that actually were parsed as integers
## 1.0.2 - delivery @14/08/2019

@@ -4,0 +9,0 @@

50

lib/index.js

@@ -22,3 +22,3 @@ /**

cast: {
int,
num,
},

@@ -142,16 +142,36 @@ color: {

// padding
settings.padding = int(padding, { ge: 0, defaultValue: defaults.padding });
const paddingValue = num(padding, { ge: 0 });
if (exists(paddingValue)) {
settings.padding = paddingValue;
}
// width
settings.width = int(w, { ge: 10, defaultValue: defaults.width });
const widthValue = num(w, { ge: 10 });
if (exists(widthValue)) {
settings.width = widthValue;
}
// height
settings.height = int(h, { ge: 10, defaultValue: defaults.height });
const heightValue = num(h, { ge: 10 });
if (exists(heightValue)) {
settings.height = heightValue;
}
// barWidth
settings.barWidth = int(barWidth, { ge: 1, defaultValue: defaults.barWidth });
const barWidthValue = num(barWidth, { ge: 1 });
if (exists(barWidthValue)) {
settings.barWidth = barWidthValue;
}
// barHeight
settings.barHeight = int(barHeight, { ge: 1, defaultValue: defaults.barHeight });
const barHeightValue = num(barHeight, { ge: 1 });
if (exists(barHeightValue)) {
settings.barHeight = barHeightValue;
}
// original1DSize

@@ -193,12 +213,14 @@ if (is(Boolean, original1DSize)) {

// fontSize
settings.hri.fontSize = int(hri.fontSize, {
ge: 1,
defaultValue: defaults.hri.fontSize,
});
const fontSizeValue = num(hri.fontSize, { ge: 1 });
if (exists(fontSizeValue)) {
settings.hri.fontSize = fontSizeValue;
}
// marginTop
settings.hri.marginTop = int(hri.marginTop, {
ge: 0,
defaultValue: defaults.hri.marginTop,
});
const marginTopValue = num(hri.marginTop, { ge: 0 });
if (exists(marginTopValue)) {
settings.hri.marginTop = marginTopValue;
}
}

@@ -205,0 +227,0 @@

{
"name": "bitgener",
"version": "1.0.2",
"version": "1.1.0",
"description": "A lightweight and zero-dependencies pure Node.js barcode library",

@@ -5,0 +5,0 @@ "author": "Adrien Valcke",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc