Socket
Socket
Sign inDemoInstall

node-red-contrib-sun-position

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-sun-position - npm Package Compare versions

Comparing version 0.1.8 to 0.1.11

0

.eslintrc.js

@@ -0,0 +0,0 @@ module.exports = {

34

nodes/lib/sunPosHelper.js

@@ -6,3 +6,3 @@ /********************************************

const sunCalc = require('suncalc');
//const sunCalc = require('suncalc2');

@@ -23,7 +23,7 @@ module.exports = {

/*******************************************************************************************************/
Date.prototype.addDays = function (days) {
/* Date.prototype.addDays = function (days) {
var date = new Date(this.valueOf());
date.setUTCDate(date.getUTCDate() + days);
return date;
}
} */

@@ -114,3 +114,4 @@ /*******************************************************************************************************/

if (d.getTime() <= cmp) {
d = d.addDays(Number(next));
d.setDate(d.getDate() + Number(next));
//d = d.addDays(Number(next));
}

@@ -125,7 +126,7 @@ }

if ((daystart + dayx) > 6) {
daypos = (daystart * -1) + dayx - 1;
} else {
daypos = daystart + dayx;
daystart = (dayx * -1);
}
if (dayx > 6) {
daypos = daystart + dayx;
if (dayx > 7) {
dayx = -1;

@@ -136,3 +137,4 @@ break;

if (dayx > 0) {
d = d.addDays(dayx);
d.setDate(d.getDate() + dayx);
//d = d.addDays(dayx);
}

@@ -154,3 +156,4 @@ }

if (d.getTime() <= cmp) {
d = d.addDays(Number(next));
d.setUTCDate(d.getUTCDate() + Number(next));
//d = d.addDays(Number(next));
}

@@ -165,7 +168,7 @@ }

if ((daystart + dayx) > 6) {
daypos = (daystart * -1) + dayx - 1;
} else {
daypos = daystart + dayx;
daystart = (dayx * -1);
}
if (dayx > 6) {
daypos = daystart + dayx;
if (dayx > 7) {
dayx = -1;

@@ -176,3 +179,4 @@ break;

if (dayx > 0) {
d = d.addDays(dayx);
d.setUTCDate(d.getUTCDate() + dayx);
//d = d.addDays(dayx);
}

@@ -179,0 +183,0 @@ }

@@ -6,3 +6,3 @@ /********************************************

const sunCalc = require('suncalc');
const sunCalc = require('suncalc2');
const path = require('path');

@@ -9,0 +9,0 @@ const hlp = require(path.join(__dirname, '/lib/sunPosHelper.js'));

{
"name": "node-red-contrib-sun-position",
"version": "0.1.8",
"version": "0.1.11",
"description": "NodeRED nodes to get sun and moon position",

@@ -49,3 +49,3 @@ "main": "none",

"dependencies": {
"suncalc": "^1.8.0"
"suncalc2": "^1.8.1"
},

@@ -52,0 +52,0 @@ "node-red": {

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