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

mongoose-geojson-schema

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-geojson-schema - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

68

GeoJSON.js
/**
* * GeoJSON Schemas for Mongoose
* *
* * rough GeoJSON schemas for use with mongoose schema creation
* *
* * Based on GeoJSON Spec @ http://geojson.org/geojson-spec.html
* *
* * Created by Ben Dalton (ben@rideamigos) on 3/27/14.
* * Copyright RideAmigos (http://rideamigos.com)
* */
* GeoJSON Schemas for Mongoose
*
* rough GeoJSON schemas for use with mongoose schema creation
*
* Based on GeoJSON Spec @ http://geojson.org/geojson-spec.html
*
* Created by Ben Dalton (ben@rideamigos) on 3/27/14.
* Copyright RideAmigos (http://rideamigos.com)
**/

@@ -16,48 +16,58 @@ var GeoJSON;

GeoJSON.Geometry = {
'type': { type: String, required: true, enum:["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"] },
coordinates:[{type:"Mixed"}]
'type' : { type: String, enum: ["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"] },
coordinates: []
}
GeoJSON.Point = {
'type': { type: String, required: true, default:"Point" },
coordinates:[{type:"Number"}]
'type' : { type: String, default: "Point" },
coordinates: [
{type: "Number"}
]
}
GeoJSON.MultiPoint = {
'type': { type: String, required: true, default:"MultiPoint" },
coordinates:[{type:"Array"}]
'type' : { type: String, default: "MultiPoint" },
coordinates: [
{type: "Array"}
]
}
GeoJSON.MultiLineString = {
'type': { type: String, required: true, default:"MultiLineString" },
coordinates:[{type:"Array"}]
'type' : { type: String, default: "MultiLineString" },
coordinates: [
{type: "Array"}
]
}
GeoJSON.Polygon = {
'type': { type: String, required: true, default:"Polygon" },
coordinates:[{type:"Array"}]
'type' : { type: String, default: "Polygon" },
coordinates: [
{type: "Array"}
]
}
GeoJSON.MultiPolygon = {
'type': { type: String, required: true, default:"MultiPolygon" },
coordinates:[{type:"Array"}]
'type' : { type: String, default: "MultiPolygon" },
coordinates: [
{type: "Array"}
]
}
GeoJSON.GeometryCollection = {
'type': { type: String, required: true, default:"GeometryCollection" },
geometries:[GeoJSON.Geometry]
'type' : { type: String, default: "GeometryCollection" },
geometries: [GeoJSON.Geometry]
}
GeoJSON.Feature = {
id:{type:"String"},
'type': { type: String, required: true, default:"Feature" },
geometry:GeoJSON.Geometry,
properties:{type:"Object"}
id : { type: "String" },
'type' : { type: String, default: "Feature" },
geometry : GeoJSON.Geometry,
properties: {type: "Object"}
}
GeoJSON.FeatureCollection = {
'type': { type: String, required: true, default:"FeatureCollection" },
features: [ GeoJSON.Feature ]
'type' : { type: String, default: "FeatureCollection" },
features: [ GeoJSON.Feature ]
}
{
"name": "mongoose-geojson-schema",
"version": "0.0.1",
"version": "0.0.2",
"description": "Schema definitions for GeoJSON types for use with Mongoose JS",

@@ -5,0 +5,0 @@ "main": "GeoJSON.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