Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@canboat/canboatjs

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canboat/canboatjs - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

27

lib/fromPgn.js

@@ -63,2 +63,6 @@ /**

if ( this.options.returnNulls === undefined ) {
this.options.returnNulls = false
}
this.name = pkg.name

@@ -239,3 +243,4 @@ this.version = pkg.version

if ( !_.isUndefined(value) && value != null ) {
if ( !_.isUndefined(value) && (value != null ||
this.options.returnNulls) ) {
pgn.fields[field.Name] = value

@@ -575,3 +580,14 @@ }

}
if ( field.Resolution && typeof value === 'number' ) {
let max
if ( typeof field.RangeMax !== 'undefined'
&& field.Resolution ) {
max = field.RangeMax / field.Resolution
}
if ( options.checkForInvalidFields !== false && max !== 'undefined' &&
field.FieldType !== 'LOOKUP' &&
field.BitLength > 1 &&
max - value <= 0 ) {
//console.log(`Bad field ${field.Name} ${max - value}`)
value = null
} if ( field.Resolution && typeof value === 'number' ) {
var resolution = field.Resolution

@@ -592,9 +608,2 @@

value = Number.parseFloat(value.toFixed(precision))
if ( typeof field.RangeMin !== 'undefined' && value < field.RangeMin ) {
value = null
}
if ( typeof field.RangeMax !== 'undefined' && value > field.RangeMax ) {
value = null
}
}

@@ -601,0 +610,0 @@

{
"name": "@canboat/canboatjs",
"version": "2.2.0",
"version": "2.3.0",
"description": "Native javascript version of canboat",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc