lanuv-parser
Advanced tools
Comparing version 0.1.0 to 0.2.0
11
index.js
@@ -11,3 +11,4 @@ 'use strict' | ||
const KUERZEL_LENGTH = 4 | ||
const MIN_KUERZEL_LENGTH = 4 | ||
const MAX_KUERZEL_LENGTH = 6 | ||
@@ -55,3 +56,3 @@ /** | ||
}) | ||
resolve(stations) | ||
resolve(stations.splice(1, stations.length)) | ||
}) | ||
@@ -76,7 +77,7 @@ .catch(error => { | ||
if (kuerzel.length < KUERZEL_LENGTH) { | ||
if (kuerzel.length < MIN_KUERZEL_LENGTH) { | ||
return Promise.reject(new Error('Kuerzel is to short')) | ||
} | ||
if (kuerzel.length > KUERZEL_LENGTH) { | ||
if (kuerzel.length > MAX_KUERZEL_LENGTH) { | ||
return Promise.reject(new Error('Kuerzel is to long')) | ||
@@ -110,2 +111,4 @@ } | ||
steckbrief.image = `${messortBildUrl}${steckbrief.kuerzel.toUpperCase()}.jpg` | ||
steckbrief.longitude = steckbrief.longitude.replace(',', '.') | ||
steckbrief.latitude = steckbrief.latitude.replace(',', '.') | ||
resolve([steckbrief]) | ||
@@ -112,0 +115,0 @@ }) |
@@ -0,4 +1,5 @@ | ||
{ | ||
"name": "lanuv-parser", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Parse LANUV website for LUQS (Air Quality) stations", | ||
@@ -5,0 +6,0 @@ "license": "MIT", |
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
7401
145