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

@cobuildlab/american-arbor-shared

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cobuildlab/american-arbor-shared

  • 4.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-82.35%
Maintainers
4
Weekly downloads
 
Created
Source

test

Documentation for the provided code:

Types:

  • GeoJsonPoint:

    • Represents a GeoJSON point.
    • Extends the GeoJsonGeometryInterface and GeoJsonInterface interfaces.
    • Properties:
      • __typename?: 'GeoJSONPoint' (optional)
      • bbox?: Maybe<Array<Maybe<Scalars['Float']>>> (optional, bounding box)
      • coordinates?: Maybe<Scalars['GeoJSONCoordinates']> (optional, coordinates)
      • type: GeoJsonType (geometry type, always 'Point' for this type)
  • GetLocationFromGeoJSONPointReturnType:

    • Return type of the getLocationFromGeoJSONPoint function.
    • Properties:
      • latitude: number (latitude)
      • longitude: number (longitude)

Functions:

  • getLocationFromGeoJSONPoint(data):
    • Extracts the latitude and longitude from a GeoJSON point.
    • Parameters:
      • data: A partial GeoJsonPoint object or null/undefined.
    • Returns:
      • A GetLocationFromGeoJSONPointReturnType object with latitude and longitude if the data is valid, otherwise undefined.

Example usage:

const geojsonPoint = {
  type: "Point",
  coordinates: [-74.0060, 40.7128],
};

const location = getLocationFromGeoJSONPoint(geojsonPoint);

if (location) {
  console.log(f"Latitude: {location.latitude}, Longitude: {location.longitude}");
} else {
  console.log("Invalid GeoJSON point.");
}

Keywords

FAQs

Package last updated on 22 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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