mapbox-to-css-font
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -55,5 +55,9 @@ var fontWeights = { | ||
for (var w in fontWeights) { | ||
if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', sp)) { | ||
var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : ''; | ||
if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) { | ||
weight = haveWeight ? weight : fontWeights[w]; | ||
parts.pop(); | ||
if (previousPart && w.startsWith(previousPart)) { | ||
parts.pop(); | ||
} | ||
break; | ||
@@ -60,0 +64,0 @@ } |
{ | ||
"name": "mapbox-to-css-font", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "Utility to convert Mapbox GL Style font names to CSS font definitions", | ||
@@ -17,6 +17,5 @@ "main": "index.js", | ||
"scripts": { | ||
"karma": "karma start test/karma.conf.js", | ||
"lint": "eslint *.js", | ||
"lint": "eslint *.js test", | ||
"pretest": "npm run lint", | ||
"test": "npm run karma -- --single-run --log-level error" | ||
"test": "mocha test/index.test.js" | ||
}, | ||
@@ -26,8 +25,4 @@ "devDependencies": { | ||
"eslint-config-openlayers": "^11.0.0", | ||
"karma": "^4.0.1", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-webpack": "^3.0.5", | ||
"mocha": "^6.0.2", | ||
"puppeteer": "^1.13.0", | ||
"should": "^13.2.3", | ||
@@ -34,0 +29,0 @@ "sinon": "^7.2.7", |
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
6108
7
77