Socket
Socket
Sign inDemoInstall

@turf/meta

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/meta

turf meta module


Version published
Weekly downloads
1.8M
decreased by-20.84%
Maintainers
4
Weekly downloads
 
Created

What is @turf/meta?

@turf/meta is a module of the Turf.js library that provides utility functions for working with GeoJSON data. It allows you to iterate over various GeoJSON objects, extract specific properties, and manipulate geometries.

What are @turf/meta's main functionalities?

coordEach

The `coordEach` function iterates over each coordinate in any GeoJSON object, allowing you to perform operations on each coordinate.

const turf = require('@turf/meta');
const point = { "type": "Feature", "geometry": { "type": "Point", "coordinates": [110, 50] } };
turf.coordEach(point, function (coord) {
  console.log(coord);
});

propEach

The `propEach` function iterates over properties in any GeoJSON Feature or FeatureCollection, allowing you to access and manipulate properties.

const turf = require('@turf/meta');
const featureCollection = { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "name": "A" }, "geometry": { "type": "Point", "coordinates": [110, 50] } } ] };
turf.propEach(featureCollection, function (properties, featureIndex) {
  console.log(properties);
});

geomEach

The `geomEach` function iterates over each geometry in any GeoJSON object, allowing you to perform operations on each geometry.

const turf = require('@turf/meta');
const featureCollection = { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [110, 50] } } ] };
turf.geomEach(featureCollection, function (geometry, featureIndex) {
  console.log(geometry);
});

Other packages similar to @turf/meta

Keywords

FAQs

Package last updated on 05 Sep 2017

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