irondb-persister
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -91,7 +91,3 @@ 'use strict' | ||
streamTagsOffset = circonus.MetricValue.createStreamTagsVector(builder, | ||
(metric.tags || []).reduce((array, tag, index) => { | ||
let tagOffset = createString(builder, tag) | ||
array.push(tagOffset) | ||
return array | ||
}, []) | ||
(metric.tags || []).map((tag) => createString(builder, tag)) | ||
) | ||
@@ -148,8 +144,3 @@ } | ||
let offsets = circonus.MetricList.createMetricsVector(builder, | ||
what.reduce((array, metric, index) => { | ||
if (! (metric instanceof Metric)) metric = validate(metric) | ||
let offset = serializeMetric(metric, builder) | ||
array.push(offset) | ||
return array | ||
}, []) | ||
validate(what).map((metric) => serializeMetric(metric, builder)) | ||
) | ||
@@ -156,0 +147,0 @@ |
@@ -50,13 +50,3 @@ 'use strict' | ||
if (Array.isArray(metric)) { | ||
let converted = 0 | ||
let array = metric.reduce((array, current, index) => { | ||
if (current instanceof Metric) { | ||
array.push(current) | ||
} else { | ||
array.push(validateMetric(current)) | ||
converted ++ | ||
} | ||
return array | ||
}, []) | ||
return converted == 0 ? metric : array | ||
return metric.map((m) => m instanceof Metric ? m : validateMetric(m)) | ||
} | ||
@@ -63,0 +53,0 @@ |
{ | ||
"name": "irondb-persister", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "IronDB RAW Persister", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87616
2427