Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hestia-earth/schema-convert

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hestia-earth/schema-convert - npm Package Compare versions

Comparing version 14.3.0 to 14.3.1

77

json.js

@@ -246,2 +246,40 @@ "use strict";

};
var parseGeoJSONValue = function (value) {
var result;
try {
result = {
type: 'FeatureCollection',
features: [{
type: 'Feature',
properties: {},
geometry: wkt_1.wktToGeoJSON(value)
}]
};
}
catch (e1) {
try {
var data = JSON.parse(value);
return result = ['Polygon', 'MultiPolygon'].includes(data.type)
? {
type: 'FeatureCollection',
features: [{
type: 'Feature',
properties: {},
geometry: data
}]
}
: ['Feature'].includes(data.type)
? {
type: 'FeatureCollection',
features: [__assign(__assign({}, data), { properties: {} // make sure they are set or it is invalid
})]
}
: data;
}
catch (e2) {
return throwError('Unable to parse GeoJSON value. Please make sure the formatting is correct.');
}
}
return result ? validateGeoJSONFormat(result) : value;
};
/**

@@ -344,40 +382,3 @@ * If the user provided a non-object where an object was expected, assume it was meant to be the `name` property.

},
'http://json.schemastore.org/geojson': function (value) {
var result;
try {
result = {
type: 'FeatureCollection',
features: [{
type: 'Feature',
properties: {},
geometry: wkt_1.wktToGeoJSON(value)
}]
};
}
catch (e1) {
try {
var data = JSON.parse(value);
return result = ['Polygon', 'MultiPolygon'].includes(data.type)
? {
type: 'FeatureCollection',
features: [{
type: 'Feature',
properties: {},
geometry: data
}]
}
: ['Feature'].includes(data.type)
? {
type: 'FeatureCollection',
features: [__assign(__assign({}, data), { properties: {} // make sure they are set or it is invalid
})]
}
: data;
}
catch (e2) {
return throwError('Unable to parse GeoJSON value. Please make sure the formatting is correct.');
}
}
return result ? validateGeoJSONFormat(result) : value;
}
'http://json.schemastore.org/geojson': function (value) { return isEmptyCell(value) ? undefined : parseGeoJSONValue(value); }
};

@@ -384,0 +385,0 @@ var getPropertyDefinition = function (schema, key, ignoreErrors, value) {

{
"name": "@hestia-earth/schema-convert",
"version": "14.3.0",
"version": "14.3.1",
"description": "Hestia Schema Converters",

@@ -5,0 +5,0 @@ "main": "index.js",

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