@turf/meta
Advanced tools
Comparing version 3.3.3 to 3.5.2-alpha.d2c36ee7
25
index.js
@@ -5,2 +5,3 @@ /** | ||
* | ||
* @name coordEach | ||
* @param {Object} layer any GeoJSON object | ||
@@ -82,2 +83,3 @@ * @param {Function} callback a method that takes (value) | ||
* | ||
* @name coordReduce | ||
* @param {Object} layer any GeoJSON object | ||
@@ -89,3 +91,3 @@ * @param {Function} callback a method that takes (memo, value) and returns | ||
* the final coordinate of LinearRings that wraps the ring in its iteration. | ||
* @return {*} combined value | ||
* @returns {*} combined value | ||
*/ | ||
@@ -104,2 +106,3 @@ function coordReduce(layer, callback, memo, excludeWrapCoord) { | ||
* | ||
* @name propEach | ||
* @param {Object} layer any GeoJSON object | ||
@@ -133,2 +136,3 @@ * @param {Function} callback a method that takes (value) | ||
* | ||
* @name propReduce | ||
* @param {Object} layer any GeoJSON object | ||
@@ -138,3 +142,15 @@ * @param {Function} callback a method that takes (memo, coord) and returns | ||
* @param {*} memo the starting value of memo: can be any type. | ||
* @return {*} combined value | ||
* @returns {*} combined value | ||
* @example | ||
* // an example of an even more advanced function that gives you the | ||
* // javascript type of each property of every feature | ||
* function propTypes (layer) { | ||
* opts = opts || {} | ||
* return propReduce(layer, function (prev, props) { | ||
* for (var prop in props) { | ||
* if (prev[prop]) continue | ||
* prev[prop] = typeof props[prop] | ||
* } | ||
* }, {}) | ||
* } | ||
*/ | ||
@@ -153,2 +169,3 @@ function propReduce(layer, callback, memo) { | ||
* | ||
* @name featureEach | ||
* @param {Object} layer any GeoJSON object | ||
@@ -176,4 +193,6 @@ * @param {Function} callback a method that takes (value) | ||
* arrays. | ||
* | ||
* @name coordAll | ||
* @param {Object} layer any GeoJSON object | ||
* @return {Array<Array<Number>>} coordinate position array | ||
* @returns {Array<Array<Number>>} coordinate position array | ||
*/ | ||
@@ -180,0 +199,0 @@ function coordAll(layer) { |
{ | ||
"name": "@turf/meta", | ||
"version": "3.3.3", | ||
"version": "3.5.2-alpha.d2c36ee7", | ||
"description": "meta and functional programming helpers for turf modules", | ||
@@ -18,3 +18,3 @@ "main": "index.js", | ||
"tape": "^3.4.0", | ||
"@turf/random": "^3.3.3" | ||
"@turf/random": "^3.5.2-alpha.d2c36ee7" | ||
}, | ||
@@ -21,0 +21,0 @@ "repository": { |
@@ -73,2 +73,18 @@ # @turf/meta | ||
**Examples** | ||
```javascript | ||
// an example of an even more advanced function that gives you the | ||
// javascript type of each property of every feature | ||
function propTypes (layer) { | ||
opts = opts || {} | ||
return propReduce(layer, function (prev, props) { | ||
for (var prop in props) { | ||
if (prev[prop]) continue | ||
prev[prop] = typeof props[prop] | ||
} | ||
}, {}) | ||
} | ||
``` | ||
Returns **Any** combined value | ||
@@ -106,2 +122,6 @@ | ||
<!-- This file is automatically generated. Please don't edit it directly: | ||
if you find an error, edit the source file (likely index.js), and re-run | ||
./scripts/generate-readmes in the turf project. --> | ||
--- | ||
@@ -108,0 +128,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17197
341
145
1
1