xform-to-json
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -13,3 +13,3 @@ // ODK geopoint / location fields are formatted as 4 space-separated numbers | ||
function isFloat(value) { | ||
return (/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/).test(value); | ||
return (/^(\-|\+)?([0-9]+(\.[0-9]+)|Infinity)$/).test(value); | ||
} | ||
@@ -16,0 +16,0 @@ |
{ | ||
"name": "xform-to-json", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Translate an XForm XML string to JSON.", | ||
@@ -5,0 +5,0 @@ "main": "xform-to-json.js", |
@@ -5,4 +5,4 @@ { | ||
"longitude": -76.8624342, | ||
"altitude": 0, | ||
"precision": 2725 | ||
"altitude": 0.0, | ||
"precision": 2725.0 | ||
}, | ||
@@ -9,0 +9,0 @@ "meta": { |
@@ -10,14 +10,9 @@ 'use strict'; | ||
var geopoints = { | ||
'0 0 0 0': { | ||
latitude: 0, | ||
longitude: 0, | ||
altitude: 0, | ||
precision: 0 | ||
'0.0 0.0 0.0 0.0': { | ||
latitude: 0.0, | ||
longitude: 0.0, | ||
altitude: 0.0, | ||
precision: 0.0 | ||
}, | ||
'-90 -180 1000 5': { | ||
latitude: -90.0, | ||
longitude: -180.0, | ||
altitude: 1000.0, | ||
precision: 5.0 | ||
}, | ||
'-90 -180 1000 5': '-90 -180 1000 5', | ||
'-90.0 -180.0 1000.0 5.0': { | ||
@@ -24,0 +19,0 @@ latitude: -90.0, |
@@ -48,3 +48,3 @@ 'use strict'; | ||
// (used for identifying valid location objects) | ||
var locationKeys = Object.keys(parseGeopoint('0 0 0 0')).sort(); | ||
var locationKeys = Object.keys(parseGeopoint('0.0 0.0 0.0 0.0')).sort(); | ||
@@ -51,0 +51,0 @@ // Returns true for a location field |
Sorry, the diff of this file is not supported yet
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
12700
277