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

@turf/meta

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/meta - npm Package Compare versions

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) {

4

package.json
{
"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 @@

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