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.2.2 to 0.2.3

12

nodes/lib/dateTimeHelper.js

@@ -365,3 +365,2 @@ /********************************************

}
return d;

@@ -1171,3 +1170,3 @@ }

function _parseDate(val, preferMonthFirst) {
console.debug('_parseDate val=' + val + ' - preferMonthFirst=' + preferMonthFirst); // eslint-disable-line
// console.debug('_parseDate val=' + val + ' - preferMonthFirst=' + preferMonthFirst); // eslint-disable-line
let res = _parseArray(val, (preferMonthFirst) ? dateFormat.parseDates.monthFirst : dateFormat.parseDates.dateFirst);

@@ -1188,3 +1187,3 @@ if (res !== null) { return res; }

function _parseDateTime(val, preferMonthFirst) {
console.debug('_parseDateTime val=' + val + ' - preferMonthFirst=' + preferMonthFirst); // eslint-disable-line
// console.debug('_parseDateTime val=' + val + ' - preferMonthFirst=' + preferMonthFirst); // eslint-disable-line
function mix(lst1, lst2, result) {

@@ -1221,4 +1220,3 @@ for (let i = 0; i < lst1.length; i++) {

function parseDateFromFormat(date, format, dayNames, monthNames, dayDiffNames) {
console.debug('parseDateFromFormat date=' + util.inspect(date) + ' - format=' + util.inspect(format) + ' dayNames'); // eslint-disable-line
// console.log('getFormattedDateOut date=' + date + ' --> format=' + format + ' [' + dayNames + '] - [' + monthNames + '] [' + dayDiffNames + ']'); // eslint-disable-line
// console.debug('parseDateFromFormat date=' + util.inspect(date) + ' - format=' + util.inspect(format) + ' [' + dayNames + '] - [' + monthNames + '] [' + dayDiffNames + ']'); // eslint-disable-line
if (dayNames) {

@@ -1243,3 +1241,3 @@ dateFormat.i18n.dayNames = dayNames;

const tryparse = (val, preferMonthFirst) => {
console.debug('try parse ' + util.inspect(val) + ' preferMonthFirst=' + preferMonthFirst); // eslint-disable-line
// console.debug('try parse ' + util.inspect(val) + ' preferMonthFirst=' + preferMonthFirst); // eslint-disable-line
let res = _parseDateTime(val, preferMonthFirst);

@@ -1289,3 +1287,3 @@ if (res !== null) { return res; }

}
console.debug('result='+ util.inspect(res) + ' ' + isNaN(res)); // eslint-disable-line
// console.debug('result='+ util.inspect(res) + ' ' + isNaN(res)); // eslint-disable-line
if (res === 'Invalid Date' || isNaN(res) || res === null) {

@@ -1292,0 +1290,0 @@ throw new Error('could not evaluate format of ' + date + ' (' + format+')');

@@ -90,3 +90,3 @@ /********************************************

this.getSunTime = (now, value, offset, multiplier, next, days) => {
node.debug('getSunTime value=' + value + ' offset=' + offset + ' multiplier=' + multiplier + ' next=' + next + ' days=' + days);
// node.debug('getSunTime value=' + value + ' offset=' + offset + ' multiplier=' + multiplier + ' next=' + next + ' days=' + days);
let result = sunTimesCheck(node, now);

@@ -125,3 +125,3 @@ result = Object.assign(result, node.sunTimesToday[value]);

this.getMoonTime = (now, value, offset, multiplier, next, days) => {
node.debug('getMoonTime value=' + value + ' offset=' + offset + ' next=' + next + ' days=' + days);
// node.debug('getMoonTime value=' + value + ' offset=' + offset + ' next=' + next + ' days=' + days);
const result = moonTimesCheck(node, now);

@@ -160,3 +160,3 @@ // node.debug('Moon Times today =' + util.inspect(node.moonTimesToday));

this.getFloatProp = (_srcNode, msg, type, value) => {
_srcNode.debug('getFloatProp type='+type+' value='+value);
// _srcNode.debug('getFloatProp type='+type+' value='+value);
let data;

@@ -235,3 +235,3 @@ // 'msg', 'flow', 'global', 'num', 'bin', 'env', 'jsonata'

const offsetX = node.getFloatProp(node, msg, offsetType, offset);
result = hlp.normalizeDate((new Date()), offsetX, multiplier, undefined, days);
result = hlp.normalizeDate(result, offsetX, multiplier, undefined, days);
return node.formatOutDate(result, format);

@@ -238,0 +238,0 @@ } else if (vType === 'dayOfMonth') {

@@ -0,0 +0,0 @@ /* eslint-disable */

@@ -0,0 +0,0 @@ [{

@@ -29,2 +29,3 @@ /********************************************

const res = node.positionConfig.getOutDataProp(node, msg, valueType, value, format, offset, offsetType, multiplier, days);
// node.debug('getOutDataProp result is:' + util.inspect(res));
if (res === null || (typeof res === 'undefined')) {

@@ -31,0 +32,0 @@ throw new Error('could not evaluate ' + valueType + '.' + value);

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

@@ -5,0 +5,0 @@ "keywords": [

@@ -0,0 +0,0 @@ # node-red-contrib-sun-position for NodeRED

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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