floCloudAPI v2.4.2e

- Adding generalDataset to floGlobals: returns the filtered general data set. (Parameters type and options)
This commit is contained in:
sairajzero 2022-09-04 04:09:27 +05:30
parent 04aad28600
commit 39d34f6e8c

View File

@ -1,4 +1,4 @@
(function(EXPORTS) { //floCloudAPI v2.4.2d
(function(EXPORTS) { //floCloudAPI v2.4.2e
/* FLO Cloud operations to send/request application data*/
'use strict';
const floCloudAPI = EXPORTS;
@ -79,6 +79,9 @@
get: () => generalData,
set: data => generalData = data
},
generalDataset: {
value: (type, options = {}) => generalData[filterKey(type, options)]
},
lastVC: {
get: () => lastVC,
set: vc => lastVC = vc
@ -375,7 +378,7 @@
return JSON.parse(decodeURIComponent(escape(atob(message))))
}
const filterKey = util.filterKey = function(type, options) {
const filterKey = util.filterKey = function(type, options = {}) {
return type + (options.comment ? ':' + options.comment : '') +
'|' + (options.group || options.receiverID || DEFAULT.adminID) +
'|' + (options.application || DEFAULT.application);
@ -1025,7 +1028,6 @@
return obj;
}
const findDiff = (lhs, rhs) => ({
added: addedDiff(lhs, rhs),
deleted: deletedDiff(lhs, rhs),