From d4b3e596b748bc939d7c829e7665f8c3b8502074 Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Mon, 13 Dec 2021 22:23:34 +0200 Subject: [PATCH] chore: remove addMetas already implemented in master --- src/fullsignalk.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/fullsignalk.js b/src/fullsignalk.js index 188b5d9f..90bd8b5c 100644 --- a/src/fullsignalk.js +++ b/src/fullsignalk.js @@ -188,32 +188,6 @@ function addValues(context, contextPath, source, timestamp, pathValues) { } } -function addMetas(context, contextPath, source, timestamp, metas) { - var len = metas.length; - for (var i = 0; i < len; ++i) { - addMeta(context, contextPath, source, timestamp, metas[i]); - } -} - -function addMeta(context, contextPath, source, timestamp, pathValue) { - if (_.isUndefined(pathValue.path) || _.isUndefined(pathValue.value)) { - console.error("Illegal value in delta:" + JSON.stringify(pathValue)); - return; - } - var valueLeaf; - - const splitPath = pathValue.path.split('.'); - - valueLeaf = splitPath.reduce(function(previous, pathPart, i) { - if (!previous[pathPart]) { - previous[pathPart] = {}; - } - return previous[pathPart]; - }, context); - - valueLeaf.meta = _.merge(valueLeaf.meta || {}, pathValue.value) -} - function addValue(context, contextPath, source, timestamp, pathValue) { let errMessage = "" if(_.isUndefined(pathValue.path)){