@turf/explode 7.2.0 → 7.3.1
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/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +11 -12
package/dist/cjs/index.cjs
CHANGED
|
@@ -20,9 +20,9 @@ function explode(geojson) {
|
|
|
20
20
|
}
|
|
21
21
|
return _helpers.featureCollection.call(void 0, points);
|
|
22
22
|
}
|
|
23
|
-
var
|
|
23
|
+
var index_default = explode;
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
exports.default =
|
|
27
|
+
exports.default = index_default; exports.explode = explode;
|
|
28
28
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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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1B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO,wCAAA,MAAwB,CAAA;AACjC;AAGA,IAAO,cAAA,EAAQ,OAAA;ADpBf;AACE;AACA;AACF,2DAAC","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"]}
|
package/dist/esm/index.js
CHANGED
|
@@ -20,9 +20,9 @@ function explode(geojson) {
|
|
|
20
20
|
}
|
|
21
21
|
return featureCollection(points);
|
|
22
22
|
}
|
|
23
|
-
var
|
|
23
|
+
var index_default = explode;
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
index_default as default,
|
|
26
26
|
explode
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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 * @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,
|
|
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,gBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/explode",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.1",
|
|
4
|
+
"description": "Takes a feature or set of features and returns all positions as points.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bugs": {
|
|
@@ -47,26 +47,25 @@
|
|
|
47
47
|
"bench": "tsx bench.ts",
|
|
48
48
|
"build": "tsup --config ../../tsup.config.ts",
|
|
49
49
|
"docs": "tsx ../../scripts/generate-readmes.ts",
|
|
50
|
-
"test": "
|
|
50
|
+
"test": "pnpm run /test:.*/",
|
|
51
51
|
"test:tape": "tsx test.ts"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/benchmark": "^2.1.5",
|
|
55
|
-
"@types/tape": "^
|
|
55
|
+
"@types/tape": "^5.8.1",
|
|
56
56
|
"benchmark": "^2.1.4",
|
|
57
57
|
"load-json-file": "^7.0.1",
|
|
58
|
-
"npm-run-all": "^4.1.5",
|
|
59
58
|
"tape": "^5.9.0",
|
|
60
|
-
"tsup": "^8.
|
|
61
|
-
"tsx": "^4.19.
|
|
62
|
-
"typescript": "^5.
|
|
63
|
-
"write-json-file": "^
|
|
59
|
+
"tsup": "^8.4.0",
|
|
60
|
+
"tsx": "^4.19.4",
|
|
61
|
+
"typescript": "^5.8.3",
|
|
62
|
+
"write-json-file": "^6.0.0"
|
|
64
63
|
},
|
|
65
64
|
"dependencies": {
|
|
66
|
-
"@turf/helpers": "
|
|
67
|
-
"@turf/meta": "
|
|
65
|
+
"@turf/helpers": "7.3.1",
|
|
66
|
+
"@turf/meta": "7.3.1",
|
|
68
67
|
"@types/geojson": "^7946.0.10",
|
|
69
68
|
"tslib": "^2.8.1"
|
|
70
69
|
},
|
|
71
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "b7f1b4eafb760431e03955499d8eac9489438219"
|
|
72
71
|
}
|