New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

omron-fins

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omron-fins - npm Package Compare versions

Comparing version 0.3.0-beta.1 to 0.4.0-beta.0

30

lib/data_utilities.js

@@ -0,1 +1,15 @@

const allowableTrueValues = {
1: true,
"1": true,
true: true,
"true": true,
"on": true
}
const allowableFalseValues = {
0: true,
"0": true,
false: true,
"false": true,
"off": true
}
function _normaliseBool(value, trueValue, falseValue){

@@ -5,13 +19,9 @@ if (typeof(value) === 'string'){

}
switch(value){
case true:
case "true":
case 1:
case "1":
case "on":
case "yes":
return trueValue;
default:
return falseValue;
if(allowableTrueValues[value]) {
return trueValue == null ? true: trueValue;
}
if(allowableFalseValues[value]) {
return typeof falseValue == "undefined" ? false : falseValue;
}
throw new Error("Invalid boolean value")
}

@@ -18,0 +28,0 @@

{
"name": "omron-fins",
"description": "Node.js implementation of the Omron FINS protocol",
"version": "0.3.0-beta.1",
"version": "0.4.0-beta.0",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "author": {

@@ -17,2 +17,3 @@ node-omron-fins

## Supported PLCs:
* CP
* CV

@@ -19,0 +20,0 @@ * CS

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