turbo-carto
Advanced tools
Comparing version 0.19.0 to 0.19.1
# Changelog | ||
## Version 0.19.1 | ||
Released 2017-05-22 | ||
- Fix ramp filter with boolean values | ||
## Version 0.19.0 | ||
Released 2016-12-12 | ||
- Updated CartoColor version to 4.0.0. | ||
@@ -7,0 +12,0 @@ |
{ | ||
"name": "turbo-carto", | ||
"version": "0.19.0", | ||
"version": "0.19.1", | ||
"description": "CartoCSS preprocessor", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -104,6 +104,6 @@ # Turbo-Carto | ||
`<` and `<=`: Last provided value will be the default value. | ||
`=`: Last provided value will be the default value, if the number of values is | ||
- `<` and `<=`: Last provided value will be the default value. | ||
- `=`: Last provided value will be the default value, if the number of values is | ||
equal to the number of filters it won't have a default value. | ||
`>` and `>=`: First provided value will be the default value. | ||
- `>` and `>=`: First provided value will be the default value. | ||
@@ -110,0 +110,0 @@ #### Associate ramp filters to your data |
@@ -326,3 +326,3 @@ 'use strict'; | ||
filters.slice(range.start, range.end).forEach(function (filterRaw, index) { | ||
var filter = Number.isFinite(filterRaw) ? filterRaw : '"' + filterRaw + '"'; | ||
var filter = processFilterValue(filterRaw); | ||
var rule = postcss.rule({ | ||
@@ -340,2 +340,12 @@ selector: '[ ' + column + ' ' + this.mapping + ' ' + filter + ' ]' | ||
function processFilterValue (rawValue) { | ||
if (rawValue === 'false') { | ||
return false; | ||
} else if (rawValue === 'true') { | ||
return true; | ||
} else { | ||
return Number.isFinite(rawValue) ? rawValue : '"' + rawValue + '"'; | ||
} | ||
} | ||
function defaultStats (stats) { | ||
@@ -342,0 +352,0 @@ stats = stats || {}; |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
101420
90
2610
1