@turf/explode 7.1.0-alpha.70 → 7.2.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.
@@ -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;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"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-explode/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACAA,kCAAuC;AACvC,wCAAyC;AAmBzC,SAAS,OAAA,CAAQ,OAAA,EAA+C;AAC9D,EAAA,MAAM,OAAA,EAA2B,CAAC,CAAA;AAClC,EAAA,GAAA,CAAI,OAAA,CAAQ,KAAA,IAAS,mBAAA,EAAqB;AACxC,IAAA,+BAAA,OAAY,EAAS,QAAA,CAAU,OAAA,EAAS;AACtC,MAAA,6BAAA,OAAU,EAAS,QAAA,CAAU,KAAA,EAAO;AAClC,QAAA,MAAA,CAAO,IAAA,CAAK,4BAAA,KAAM,EAAO,OAAA,CAAQ,UAAU,CAAC,CAAA;AAAA,MAC9C,CAAC,CAAA;AAAA,IACH,CAAC,CAAA;AAAA,EACH,EAAA,KAAA,GAAA,CAAW,OAAA,CAAQ,KAAA,IAAS,SAAA,EAAW;AACrC,IAAA,6BAAA,OAAU,EAAS,QAAA,CAAU,KAAA,EAAO;AAClC,MAAA,MAAA,CAAO,IAAA,CAAK,4BAAA,KAAM,EAAO,OAAA,CAAQ,UAAU,CAAC,CAAA;AAAA,IAC9C,CAAC,CAAA;AAAA,EACH,EAAA,KAAO;AAEL,IAAA,6BAAA,OAAU,EAAS,QAAA,CAAU,KAAA,EAAO;AAClC,MAAA,MAAA,CAAO,IAAA,CAAK,4BAAA,KAAW,CAAC,CAAA;AAAA,IAC1B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO,wCAAA,MAAwB,CAAA;AACjC;AAGA,IAAO,qBAAA,EAAQ,OAAA;ADpBf;AACE;AACA;AACF,kEAAC","file":"/home/runner/work/turf/turf/packages/turf-explode/dist/cjs/index.cjs","sourcesContent":[null,"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 * @function\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"]}
@@ -4,7 +4,7 @@ import { FeatureCollection, Point } from 'geojson';
4
4
  /**
5
5
  * Takes a feature or set of features and returns all positions as {@link Point|points}.
6
6
  *
7
- * @name explode
7
+ * @function
8
8
  * @param {GeoJSON} geojson input features
9
9
  * @returns {FeatureCollection<point>} points representing the exploded input features
10
10
  * @throws {Error} if it encounters an unknown geometry type
@@ -4,7 +4,7 @@ import { FeatureCollection, Point } from 'geojson';
4
4
  /**
5
5
  * Takes a feature or set of features and returns all positions as {@link Point|points}.
6
6
  *
7
- * @name explode
7
+ * @function
8
8
  * @param {GeoJSON} geojson input features
9
9
  * @returns {FeatureCollection<point>} points representing the exploded input features
10
10
  * @throws {Error} if it encounters an unknown geometry type
@@ -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;AAGA,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 * @function\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.1.0-alpha.70+948cdafaf",
3
+ "version": "7.2.0",
4
4
  "description": "turf explode module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -52,21 +52,21 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/benchmark": "^2.1.5",
55
- "@types/tape": "^4.2.32",
55
+ "@types/tape": "^4.13.4",
56
56
  "benchmark": "^2.1.4",
57
57
  "load-json-file": "^7.0.1",
58
58
  "npm-run-all": "^4.1.5",
59
- "tape": "^5.7.2",
60
- "tsup": "^8.0.1",
61
- "tsx": "^4.6.2",
62
- "typescript": "^5.2.2",
59
+ "tape": "^5.9.0",
60
+ "tsup": "^8.3.5",
61
+ "tsx": "^4.19.2",
62
+ "typescript": "^5.5.4",
63
63
  "write-json-file": "^5.0.0"
64
64
  },
65
65
  "dependencies": {
66
- "@turf/helpers": "^7.1.0-alpha.70+948cdafaf",
67
- "@turf/meta": "^7.1.0-alpha.70+948cdafaf",
66
+ "@turf/helpers": "^7.2.0",
67
+ "@turf/meta": "^7.2.0",
68
68
  "@types/geojson": "^7946.0.10",
69
- "tslib": "^2.6.2"
69
+ "tslib": "^2.8.1"
70
70
  },
71
- "gitHead": "948cdafaf70606d2e27fcc79973fa48ee1182067"
71
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
72
72
  }