Installations
npm install turf-meta
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
4.4.7
NPM Version
2.15.8
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Turfjs
Download Statistics
Total Downloads
5,662,770
Last Day
3,593
Last Week
15,849
Last Month
70,141
Last Year
1,057,656
GitHub Statistics
5 Stars
17 Commits
3 Forks
5 Watching
2 Branches
4 Contributors
Bundle Size
1.44 kB
Minified
621.00 B
Minified + Gzipped
Package Meta Information
Latest Version
3.0.12
Package Id
turf-meta@3.0.12
Size
3.51 kB
NPM Version
2.15.8
Node Version
4.4.7
Publised On
05 Jul 2016
Total Downloads
Cumulative downloads
Total Downloads
5,662,770
Last day
-4.7%
3,593
Compared to previous day
Last week
-10.3%
15,849
Compared to previous week
Last month
6.1%
70,141
Compared to previous month
Last year
4.6%
1,057,656
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
2
turf-meta
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 objectcallback
(Function
): a method that takes (value)
1var point = { type: 'Point', coordinates: [0, 0] }; 2coordEach(point, function(coords) { 3 // coords is equal to [0, 0] 4});
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 objectcallback
(Function
): a method that takes (memo, value) and returns a new memomemo
(``): 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 objectcallback
(Function
): a method that takes (value)
1var point = { type: 'Feature', geometry: null, properties: { foo: 1 } }; 2propEach(point, function(props) { 3 // props is equal to { foo: 1} 4});
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 objectcallback
(Function
): a method that takes (memo, coord) and returns a new memomemo
(``): the starting value of memo: can be any type.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 2/16 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Score
2.7
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More