New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@globalfishingwatch/layer-composer

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globalfishingwatch/layer-composer - npm Package Compare versions

Comparing version 0.7.4 to 0.7.5

31

dist/lib/layer-composer/generators/heatmap/heatmap.js

@@ -56,18 +56,17 @@ "use strict";

var min = statsByZoom.min, max = statsByZoom.max, avg = statsByZoom.avg;
var precision = Array.from(max.toString()).reduce(function (acc) { return acc * 10; }, 0.1);
var roundedMax = Math.round(max / precision) * precision;
var scale = d3_scale_1.scalePow()
.exponent(10)
.domain([0, 0.5, 1])
.range([min, avg, roundedMax]);
stops = [0, min, scale(0.25), scale(0.5), scale(0.75), roundedMax];
var prevStepValues_1 = [];
stops = stops.map(function (stop, index) {
var roundValue = Math.round(stop);
if (prevStepValues_1.indexOf(roundValue) > -1) {
roundValue = prevStepValues_1[index - 1] + 1;
}
prevStepValues_1.push(roundValue);
return roundValue;
});
if (min && max && avg) {
var precision = Array.from(max.toString()).reduce(function (acc) { return acc * 10; }, 0.1);
var roundedMax = Math.round(max / precision) * precision;
var scale = d3_scale_1.scalePow().exponent(10).domain([0, 0.5, 1]).range([min, avg, roundedMax]);
stops = [0, min, scale(0.25), scale(0.5), scale(0.75), roundedMax];
var prevStepValues_1 = [];
stops = stops.map(function (stop, index) {
var roundValue = Math.round(stop);
if (prevStepValues_1.indexOf(roundValue) > -1) {
roundValue = prevStepValues_1[index - 1] + 1;
}
prevStepValues_1.push(roundValue);
return roundValue;
});
}
}

@@ -74,0 +73,0 @@ var pickValueAt = 'value';

{
"name": "@globalfishingwatch/layer-composer",
"version": "0.7.4",
"version": "0.7.5",
"description": "Tools to convert layer configuration to data structures needed in Mapbox GL GFW interactive maps ",

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

@@ -66,19 +66,19 @@ import flatten from 'lodash/flatten'

const { min, max, avg } = statsByZoom
const precision = Array.from(max.toString()).reduce((acc) => acc * 10, 0.1)
const roundedMax = Math.round(max / precision) * precision
const scale = scalePow()
.exponent(10)
.domain([0, 0.5, 1])
.range([min, avg, roundedMax])
stops = [0, min, scale(0.25), scale(0.5), scale(0.75), roundedMax]
if (min && max && avg) {
const precision = Array.from(max.toString()).reduce((acc) => acc * 10, 0.1)
const roundedMax = Math.round(max / precision) * precision
const scale = scalePow().exponent(10).domain([0, 0.5, 1]).range([min, avg, roundedMax])
const prevStepValues: number[] = []
stops = stops.map((stop, index) => {
let roundValue = Math.round(stop)
if (prevStepValues.indexOf(roundValue) > -1) {
roundValue = prevStepValues[index - 1] + 1
}
prevStepValues.push(roundValue)
return roundValue
})
stops = [0, min, scale(0.25), scale(0.5), scale(0.75), roundedMax]
const prevStepValues: number[] = []
stops = stops.map((stop, index) => {
let roundValue = Math.round(stop)
if (prevStepValues.indexOf(roundValue) > -1) {
roundValue = prevStepValues[index - 1] + 1
}
prevStepValues.push(roundValue)
return roundValue
})
}
}

@@ -85,0 +85,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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