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

node-red-contrib-agilite

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-agilite - npm Package Compare versions

Comparing version 5.4.1 to 5.4.2

33

adhoc/adhoc.js

@@ -10,31 +10,6 @@ module.exports = function (RED) {

this.fieldType = config.fieldType || "msg";
//require type-detect module
const typeDetect = require('type-detect');
returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -57,3 +32,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -60,0 +35,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -53,3 +27,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -56,0 +30,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
const typeDetect = require("type-detect");
this.on('input', function (msg) {

@@ -52,3 +26,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -55,0 +29,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -54,3 +28,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -57,0 +31,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -58,3 +32,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -61,0 +35,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -51,3 +25,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -54,0 +28,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -52,3 +26,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -55,0 +29,0 @@

2

package.json
{
"name": "node-red-contrib-agilite",
"license": "MIT",
"version": "5.4.1",
"version": "5.4.2",
"description": "Node-RED nodes to integrate with Agilit-e cloud or Agilit-e on-prem",

@@ -6,0 +6,0 @@ "homepage": "https://portal.agilite.io",

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -59,3 +33,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -62,0 +36,0 @@

@@ -11,30 +11,4 @@ module.exports = function (RED) {

returnTypeOf = (input) => {
let stringConstructor = "test".constructor;
let arrayConstructor = [].constructor;
let objectConstructor = {}.constructor;
let booleanConstructor = true.constructor;
let integerConstructor = (123).constructor;
const typeDetect = require("type-detect");
let result = null;
if (input === undefined) {
result = "undefined";
} else if (input === null) {
result = null;
} else if (input.constructor === stringConstructor) {
result = "String";
} else if (input.constructor === arrayConstructor) {
result = "Array";
} else if (input.constructor === objectConstructor) {
result = "Object";
} else if (input.constructor === booleanConstructor) {
result = "Boolean";
} else if (input.constructor === integerConstructor) {
result = "Number";
}
return result;
};
this.on('input', function (msg) {

@@ -52,3 +26,3 @@ var serverConfig = RED.nodes.getNode(config.server);

//Check if there's valid data to pass
if (returnTypeOf(msg.payload) !== "Object")
if (typeDetect(msg.payload) !== "Object")
msg.payload = {};

@@ -55,0 +29,0 @@

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