turf-meta

WebJar for turf-meta

Лицензия

Лицензия

ISC
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

turf-meta
Последняя версия

Последняя версия

3.0.12
Дата

Дата

Тип

Тип

jar
Описание

Описание

turf-meta
WebJar for turf-meta
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/turf-junkyard/turf-meta

Скачать turf-meta

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/turf-meta/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>turf-meta</artifactId>
    <version>3.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/turf-meta/
implementation 'org.webjars.npm:turf-meta:3.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/turf-meta/
implementation ("org.webjars.npm:turf-meta:3.0.12")
'org.webjars.npm:turf-meta:jar:3.0.12'
<dependency org="org.webjars.npm" name="turf-meta" rev="3.0.12">
  <artifact name="turf-meta" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='turf-meta', version='3.0.12')
)
libraryDependencies += "org.webjars.npm" % "turf-meta" % "3.0.12"
[org.webjars.npm/turf-meta "3.0.12"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

turf-meta

build status

Functional helpers for Turf modules.

Why? Because many turf modules have a similar pattern of running some operation over every coordinate or property object, etc. This module unifies those patterns into one structure and make sure that turf is able to handle unusual structures (geometry roots, null geometries, geometrycollections, and so on). It's also quite fast - it uses monomorphic functions as much as possible and avoids copying data unnecessarily.

coordEach(layer, callback)

Lazily iterate over coordinates in any GeoJSON object, similar to Array.forEach.

  • layer (Object): any GeoJSON object
  • callback (Function): a method that takes (value)
var point = { type: 'Point', coordinates: [0, 0] };
coordEach(point, function(coords) {
  // coords is equal to [0, 0]
});

coordReduce(layer, callback, memo)

Lazily reduce coordinates in any GeoJSON object into a single value, similar to how Array.reduce works. However, in this case we lazily runthe reduction, so an array of all coordinates is unnecessary.

  • layer (Object): any GeoJSON object
  • callback (Function): a method that takes (memo, value) and returns a new memo
  • memo (``): the starting value of memo: can be any type.

propEach(layer, callback)

Lazily iterate over property objects in any GeoJSON object, similar to Array.forEach.

  • layer (Object): any GeoJSON object
  • callback (Function): a method that takes (value)
var point = { type: 'Feature', geometry: null, properties: { foo: 1 } };
propEach(point, function(props) {
  // props is equal to { foo: 1}
});

propReduce(layer, callback, memo)

Lazily reduce properties in any GeoJSON object into a single value, similar to how Array.reduce works. However, in this case we lazily runthe reduction, so an array of all properties is unnecessary.

  • layer (Object): any GeoJSON object
  • callback (Function): a method that takes (memo, coord) and returns a new memo
  • memo (``): the starting value of memo: can be any type.
org.webjars.npm

deprecated turf modules: do not use or reference, for redirects only

turf is now a monorepo: all turf modules are in Turfjs/turf

Версии библиотеки

Версия
3.0.12