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

turf-explode

Package Overview
Dependencies
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-explode - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

6

index.js

@@ -10,3 +10,3 @@ var featureCollection = require('turf-helpers').featureCollection;

* @name explode
* @param {(Feature|FeatureCollection)} input input features
* @param {(Feature|FeatureCollection)} geojson input features
* @return {FeatureCollection<point>} points representing the exploded input features

@@ -38,5 +38,5 @@ * @throws {Error} if it encounters an unknown geometry type

*/
module.exports = function (layer) {
module.exports = function (geojson) {
var points = [];
each(layer, function (coord) {
each(geojson, function (coord) {
points.push(point(coord));

@@ -43,0 +43,0 @@ });

{
"name": "turf-explode",
"version": "3.0.10",
"version": "3.0.12",
"description": "turf explode module",

@@ -29,8 +29,8 @@ "main": "index.js",

"geojson-fixtures": "^0.6.1",
"turf-helpers": "^3.0.10"
"turf-helpers": "^3.0.12"
},
"dependencies": {
"turf-meta": "^3.0.10",
"turf-helpers": "^3.0.10"
"turf-meta": "^3.0.12",
"turf-helpers": "^3.0.12"
}
}
# turf-explode
[![build status](https://secure.travis-ci.org/Turfjs/turf-explode.png)](http://travis-ci.org/Turfjs/turf-explode)
# explode
turf explode module
### `turf.explode(input)`
Takes a feature or set of features and returns all positions as
Point|points.
[points](Point).
**Parameters**
### Parameters
- `geojson` **(Feature | FeatureCollection)** input features
| parameter | type | description |
| --------- | -------------------------- | -------------- |
| `input` | Feature\,FeatureCollection | input features |
**Examples**
### Example
```js
```javascript
var poly = {

@@ -48,9 +39,17 @@ "type": "Feature",

- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** if it encounters an unknown geometry type
**Returns** `FeatureCollection.<point>`, points representing the exploded input features
Returns **FeatureCollection&lt;point>** points representing the exploded input features
## Installation
---
Requires [nodejs](http://nodejs.org/).
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
### Installation
Install this module individually:
```sh

@@ -60,8 +59,6 @@ $ npm install turf-explode

## Tests
Or install the Turf module that includes it as a function:
```sh
$ npm test
$ npm install turf
```
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