@turf/sample 6.4.0 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,12 +6,12 @@
6
6
 
7
7
  Takes a [FeatureCollection][1] and returns a FeatureCollection with given number of [features][2] at random.
8
8
 
9
- **Parameters**
9
+ ### Parameters
10
10
 
11
- - `featurecollection` **[FeatureCollection][3]** set of input features
12
- - `num` **[number][4]** number of features to select
11
+ * `featurecollection` **[FeatureCollection][3]** set of input features
12
+ * `num` **[number][4]** number of features to select
13
13
 
14
- **Examples**
14
+ ### Examples
15
15
 
16
16
  ```javascript
17
17
  var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});
package/dist/es/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { featureCollection } from '@turf/helpers';
2
2
 
3
3
  // http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array
4
+
4
5
  /**
5
6
  * Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
6
7
  *
package/dist/js/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  var helpers = require('@turf/helpers');
4
4
 
5
5
  // http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array
6
+
6
7
  /**
7
8
  * Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
8
9
  *
@@ -49,3 +50,4 @@ function getRandomSubarray(arr, size) {
49
50
  }
50
51
 
51
52
  module.exports = sample;
53
+ module.exports.default = sample;
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FeatureCollection, GeometryObject } from "@turf/helpers";
1
+ import { FeatureCollection, GeometryObject } from "geojson";
2
2
 
3
3
  /**
4
4
  * http://turfjs.org/docs/#sample
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/sample",
3
- "version": "6.4.0",
3
+ "version": "7.0.0-alpha.0",
4
4
  "description": "turf sample module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -12,6 +12,7 @@
12
12
  "type": "git",
13
13
  "url": "git://github.com/Turfjs/turf.git"
14
14
  },
15
+ "funding": "https://opencollective.com/turf",
15
16
  "publishConfig": {
16
17
  "access": "public"
17
18
  },
@@ -50,7 +51,7 @@
50
51
  "tape": "*"
51
52
  },
52
53
  "dependencies": {
53
- "@turf/helpers": "^6.4.0"
54
+ "@turf/helpers": "^7.0.0-alpha.0"
54
55
  },
55
- "gitHead": "1e62773cfc88c627cca8effcb5c14cfb65a905ac"
56
+ "gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
56
57
  }