@turf/explode 7.0.0 → 7.1.0-alpha.7

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.
@@ -1,7 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // index.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// index.ts
5
2
  var _meta = require('@turf/meta');
6
3
  var _helpers = require('@turf/helpers');
7
4
  function explode(geojson) {
@@ -23,7 +20,6 @@ function explode(geojson) {
23
20
  }
24
21
  return _helpers.featureCollection.call(void 0, points);
25
22
  }
26
- __name(explode, "explode");
27
23
  var turf_explode_default = explode;
28
24
 
29
25
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";;;;AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,OAAO,yBAAyB;AAmBzC,SAAS,QAAQ,SAA+C;AAC9D,QAAM,SAA2B,CAAC;AAClC,MAAI,QAAQ,SAAS,qBAAqB;AACxC,gBAAY,SAAS,SAAU,SAAS;AACtC,gBAAU,SAAS,SAAU,OAAO;AAClC,eAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH,CAAC;AAAA,EACH,WAAW,QAAQ,SAAS,WAAW;AACrC,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,IAC9C,CAAC;AAAA,EACH,OAAO;AAEL,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,KAAK,CAAC;AAAA,IAC1B,CAAC;AAAA,EACH;AAEA,SAAO,kBAAkB,MAAM;AACjC;AApBS;AAuBT,IAAO,uBAAQ","sourcesContent":["import { coordEach, featureEach } from \"@turf/meta\";\nimport { point, featureCollection } from \"@turf/helpers\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport type { Feature, FeatureCollection, Point } from \"geojson\";\n\n/**\n * Takes a feature or set of features and returns all positions as {@link Point|points}.\n *\n * @name explode\n * @param {GeoJSON} geojson input features\n * @returns {FeatureCollection<point>} points representing the exploded input features\n * @throws {Error} if it encounters an unknown geometry type\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var explode = turf.explode(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, explode]\n */\nfunction explode(geojson: AllGeoJSON): FeatureCollection<Point> {\n const points: Feature<Point>[] = [];\n if (geojson.type === \"FeatureCollection\") {\n featureEach(geojson, function (feature) {\n coordEach(feature, function (coord) {\n points.push(point(coord, feature.properties));\n });\n });\n } else if (geojson.type === \"Feature\") {\n coordEach(geojson, function (coord) {\n points.push(point(coord, geojson.properties));\n });\n } else {\n // No properties to copy.\n coordEach(geojson, function (coord) {\n points.push(point(coord));\n });\n }\n\n return featureCollection(points);\n}\n\nexport { explode };\nexport default explode;\n"]}
1
+ {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,OAAO,yBAAyB;AAmBzC,SAAS,QAAQ,SAA+C;AAC9D,QAAM,SAA2B,CAAC;AAClC,MAAI,QAAQ,SAAS,qBAAqB;AACxC,gBAAY,SAAS,SAAU,SAAS;AACtC,gBAAU,SAAS,SAAU,OAAO;AAClC,eAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH,CAAC;AAAA,EACH,WAAW,QAAQ,SAAS,WAAW;AACrC,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,IAC9C,CAAC;AAAA,EACH,OAAO;AAEL,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,KAAK,CAAC;AAAA,IAC1B,CAAC;AAAA,EACH;AAEA,SAAO,kBAAkB,MAAM;AACjC;AAGA,IAAO,uBAAQ","sourcesContent":["import { coordEach, featureEach } from \"@turf/meta\";\nimport { point, featureCollection } from \"@turf/helpers\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport type { Feature, FeatureCollection, Point } from \"geojson\";\n\n/**\n * Takes a feature or set of features and returns all positions as {@link Point|points}.\n *\n * @name explode\n * @param {GeoJSON} geojson input features\n * @returns {FeatureCollection<point>} points representing the exploded input features\n * @throws {Error} if it encounters an unknown geometry type\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var explode = turf.explode(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, explode]\n */\nfunction explode(geojson: AllGeoJSON): FeatureCollection<Point> {\n const points: Feature<Point>[] = [];\n if (geojson.type === \"FeatureCollection\") {\n featureEach(geojson, function (feature) {\n coordEach(feature, function (coord) {\n points.push(point(coord, feature.properties));\n });\n });\n } else if (geojson.type === \"Feature\") {\n coordEach(geojson, function (coord) {\n points.push(point(coord, geojson.properties));\n });\n } else {\n // No properties to copy.\n coordEach(geojson, function (coord) {\n points.push(point(coord));\n });\n }\n\n return featureCollection(points);\n}\n\nexport { explode };\nexport default explode;\n"]}
package/dist/esm/index.js CHANGED
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // index.ts
5
2
  import { coordEach, featureEach } from "@turf/meta";
6
3
  import { point, featureCollection } from "@turf/helpers";
@@ -23,7 +20,6 @@ function explode(geojson) {
23
20
  }
24
21
  return featureCollection(points);
25
22
  }
26
- __name(explode, "explode");
27
23
  var turf_explode_default = explode;
28
24
  export {
29
25
  turf_explode_default as default,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { coordEach, featureEach } from \"@turf/meta\";\nimport { point, featureCollection } from \"@turf/helpers\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport type { Feature, FeatureCollection, Point } from \"geojson\";\n\n/**\n * Takes a feature or set of features and returns all positions as {@link Point|points}.\n *\n * @name explode\n * @param {GeoJSON} geojson input features\n * @returns {FeatureCollection<point>} points representing the exploded input features\n * @throws {Error} if it encounters an unknown geometry type\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var explode = turf.explode(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, explode]\n */\nfunction explode(geojson: AllGeoJSON): FeatureCollection<Point> {\n const points: Feature<Point>[] = [];\n if (geojson.type === \"FeatureCollection\") {\n featureEach(geojson, function (feature) {\n coordEach(feature, function (coord) {\n points.push(point(coord, feature.properties));\n });\n });\n } else if (geojson.type === \"Feature\") {\n coordEach(geojson, function (coord) {\n points.push(point(coord, geojson.properties));\n });\n } else {\n // No properties to copy.\n coordEach(geojson, function (coord) {\n points.push(point(coord));\n });\n }\n\n return featureCollection(points);\n}\n\nexport { explode };\nexport default explode;\n"],"mappings":";;;;AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,OAAO,yBAAyB;AAmBzC,SAAS,QAAQ,SAA+C;AAC9D,QAAM,SAA2B,CAAC;AAClC,MAAI,QAAQ,SAAS,qBAAqB;AACxC,gBAAY,SAAS,SAAU,SAAS;AACtC,gBAAU,SAAS,SAAU,OAAO;AAClC,eAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH,CAAC;AAAA,EACH,WAAW,QAAQ,SAAS,WAAW;AACrC,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,IAC9C,CAAC;AAAA,EACH,OAAO;AAEL,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,KAAK,CAAC;AAAA,IAC1B,CAAC;AAAA,EACH;AAEA,SAAO,kBAAkB,MAAM;AACjC;AApBS;AAuBT,IAAO,uBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { coordEach, featureEach } from \"@turf/meta\";\nimport { point, featureCollection } from \"@turf/helpers\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport type { Feature, FeatureCollection, Point } from \"geojson\";\n\n/**\n * Takes a feature or set of features and returns all positions as {@link Point|points}.\n *\n * @name explode\n * @param {GeoJSON} geojson input features\n * @returns {FeatureCollection<point>} points representing the exploded input features\n * @throws {Error} if it encounters an unknown geometry type\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var explode = turf.explode(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, explode]\n */\nfunction explode(geojson: AllGeoJSON): FeatureCollection<Point> {\n const points: Feature<Point>[] = [];\n if (geojson.type === \"FeatureCollection\") {\n featureEach(geojson, function (feature) {\n coordEach(feature, function (coord) {\n points.push(point(coord, feature.properties));\n });\n });\n } else if (geojson.type === \"Feature\") {\n coordEach(geojson, function (coord) {\n points.push(point(coord, geojson.properties));\n });\n } else {\n // No properties to copy.\n coordEach(geojson, function (coord) {\n points.push(point(coord));\n });\n }\n\n return featureCollection(points);\n}\n\nexport { explode };\nexport default explode;\n"],"mappings":";AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,OAAO,yBAAyB;AAmBzC,SAAS,QAAQ,SAA+C;AAC9D,QAAM,SAA2B,CAAC;AAClC,MAAI,QAAQ,SAAS,qBAAqB;AACxC,gBAAY,SAAS,SAAU,SAAS;AACtC,gBAAU,SAAS,SAAU,OAAO;AAClC,eAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH,CAAC;AAAA,EACH,WAAW,QAAQ,SAAS,WAAW;AACrC,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,OAAO,QAAQ,UAAU,CAAC;AAAA,IAC9C,CAAC;AAAA,EACH,OAAO;AAEL,cAAU,SAAS,SAAU,OAAO;AAClC,aAAO,KAAK,MAAM,KAAK,CAAC;AAAA,IAC1B,CAAC;AAAA,EACH;AAEA,SAAO,kBAAkB,MAAM;AACjC;AAGA,IAAO,uBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/explode",
3
- "version": "7.0.0",
3
+ "version": "7.1.0-alpha.7+0ce6ecca0",
4
4
  "description": "turf explode module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -63,9 +63,9 @@
63
63
  "write-json-file": "^5.0.0"
64
64
  },
65
65
  "dependencies": {
66
- "@turf/helpers": "^7.0.0",
67
- "@turf/meta": "^7.0.0",
66
+ "@turf/helpers": "^7.1.0-alpha.7+0ce6ecca0",
67
+ "@turf/meta": "^7.1.0-alpha.7+0ce6ecca0",
68
68
  "tslib": "^2.6.2"
69
69
  },
70
- "gitHead": "3d3a7917025fbabe191dbddbc89754b86f9c7739"
70
+ "gitHead": "0ce6ecca05829690270fec6d6bed2003495fe0ea"
71
71
  }