diff --git a/packages/turf/index.d.ts b/packages/turf/index.d.ts index ef1107688d..dda7b54660 100644 --- a/packages/turf/index.d.ts +++ b/packages/turf/index.d.ts @@ -24,8 +24,7 @@ import { geojsonType, featureOf, collectionOf, - containsNumber -} from '@turf/invariant'; + containsNumber} from '@turf/invariant'; import { coordEach, coordReduce, @@ -37,9 +36,7 @@ import { geomEach, geomReduce, flattenEach, - flattenReduce, -} from '@turf/meta'; - + flattenReduce} from '@turf/meta'; import * as isolines from '@turf/isolines'; import * as convex from '@turf/convex'; import * as within from '@turf/within'; @@ -222,4 +219,7 @@ export { transformTranslate, lineOffset, polygonize, + bearingToAngle, + featureReduce, + geomReduce }; diff --git a/packages/turf/module.js b/packages/turf/module.js new file mode 100644 index 0000000000..dda7b54660 --- /dev/null +++ b/packages/turf/module.js @@ -0,0 +1,225 @@ +import { + point, + polygon, + lineString, + multiPoint, + multiPolygon, + multiLineString, + feature, + featureCollection, + geometryCollection, + radiansToDistance, + distanceToRadians, + distanceToDegrees, + bearingToAngle, + radians2degrees, + degrees2radians, + round, + convertDistance} from '@turf/helpers'; +import { + getGeom, + getGeomType, + getCoord, + getCoords, + geojsonType, + featureOf, + collectionOf, + containsNumber} from '@turf/invariant'; +import { + coordEach, + coordReduce, + propEach, + propReduce, + featureEach, + featureReduce, + coordAll, + geomEach, + geomReduce, + flattenEach, + flattenReduce} from '@turf/meta'; +import * as isolines from '@turf/isolines'; +import * as convex from '@turf/convex'; +import * as within from '@turf/within'; +import * as concave from '@turf/concave'; +import * as difference from '@turf/difference'; +import * as dissolve from '@turf/dissolve'; +import * as collect from '@turf/collect'; +import * as flip from '@turf/flip'; +import * as simplify from '@turf/simplify'; +import * as bezier from '@turf/bezier'; +import * as tag from '@turf/tag'; +import * as sample from '@turf/sample'; +import * as envelope from '@turf/envelope'; +import * as square from '@turf/square'; +import * as circle from '@turf/circle'; +import * as midpoint from '@turf/midpoint'; +import * as buffer from '@turf/buffer'; +import * as center from '@turf/center'; +import * as centerOfMass from '@turf/center-of-mass'; +import * as centroid from '@turf/centroid'; +import * as combine from '@turf/combine'; +import * as distance from '@turf/distance'; +import * as explode from '@turf/explode'; +import * as bbox from '@turf/bbox'; +import * as tesselate from '@turf/tesselate'; +import * as bboxPolygon from '@turf/bbox-polygon'; +import * as inside from '@turf/inside'; +import * as intersect from '@turf/intersect'; +import * as nearest from '@turf/nearest'; +import * as planepoint from '@turf/planepoint'; +import * as random from '@turf/random'; +import * as tin from '@turf/tin'; +import * as union from '@turf/union'; +import * as bearing from '@turf/bearing'; +import * as destination from '@turf/destination'; +import * as kinks from '@turf/kinks'; +import * as pointOnSurface from '@turf/point-on-surface'; +import * as area from '@turf/area'; +import * as along from '@turf/along'; +import * as lineDistance from '@turf/line-distance'; +import * as lineSlice from '@turf/line-slice'; +import * as lineSliceAlong from '@turf/line-slice-along'; +import * as pointOnLine from '@turf/point-on-line'; +import * as pointGrid from '@turf/point-grid'; +import * as squareGrid from '@turf/square-grid'; +import * as triangleGrid from '@turf/triangle-grid'; +import * as hexGrid from '@turf/hex-grid'; +import * as idw from '@turf/idw'; +import * as truncate from '@turf/truncate'; +import * as flatten from '@turf/flatten'; +import * as lineIntersect from '@turf/line-intersect'; +import * as mask from '@turf/mask'; +import * as lineChunk from '@turf/line-chunk'; +import * as unkinkPolygon from '@turf/unkink-polygon'; +import * as greatCircle from '@turf/great-circle'; +import * as lineSegment from '@turf/line-segment'; +import * as lineSplit from '@turf/line-split'; +import * as lineArc from '@turf/line-arc'; +import * as polygonToLineString from '@turf/polygon-to-linestring'; +import * as lineStringToPolygon from '@turf/linestring-to-polygon'; +import * as bboxClip from '@turf/bbox-clip'; +import * as lineOverlap from '@turf/line-overlap'; +import * as sector from '@turf/sector'; +import * as rhumbBearing from '@turf/rhumb-bearing'; +import * as rhumbDistance from '@turf/rhumb-distance'; +import * as rhumbDestination from '@turf/rhumb-destination'; +import * as polygonTangents from '@turf/polygon-tangents'; +import * as rewind from '@turf/rewind'; +import * as isobands from '@turf/isobands'; +import * as transformRotate from '@turf/transform-rotate'; +import * as transformScale from '@turf/transform-scale'; +import * as transformTranslate from '@turf/transform-translate'; +import * as lineOffset from '@turf/line-offset'; +import * as polygonize from '@turf/polygonize'; +export { + isolines, + convex, + within, + concave, + difference, + dissolve, + collect, + flip, + simplify, + bezier, + tag, + sample, + envelope, + square, + circle, + midpoint, + buffer, + center, + centerOfMass, + centroid, + combine, + distance, + explode, + bbox, + tesselate, + bboxPolygon, + inside, + intersect, + nearest, + planepoint, + random, + tin, + union, + bearing, + destination, + kinks, + pointOnSurface, + area, + along, + lineDistance, + lineSlice, + lineSliceAlong, + pointOnLine, + pointGrid, + squareGrid, + triangleGrid, + hexGrid, + idw, + point, + polygon, + lineString, + multiPoint, + multiPolygon, + multiLineString, + feature, + featureCollection, + geometryCollection, + radiansToDistance, + distanceToRadians, + distanceToDegrees, + getCoord, + getCoords, + getGeom, + getGeomType, + geojsonType, + featureOf, + collectionOf, + containsNumber, + truncate, + flatten, + coordEach, + coordReduce, + propEach, + propReduce, + featureEach, + coordAll, + geomEach, + lineIntersect, + mask, + lineChunk, + unkinkPolygon, + greatCircle, + lineSegment, + lineSplit, + lineArc, + polygonToLineString, + lineStringToPolygon, + bboxClip, + lineOverlap, + sector, + rhumbBearing, + rhumbDistance, + rhumbDestination, + polygonTangents, + rewind, + isobands, + radians2degrees, + degrees2radians, + round, + flattenEach, + flattenReduce, + convertDistance, + transformRotate, + transformScale, + transformTranslate, + lineOffset, + polygonize, + bearingToAngle, + featureReduce, + geomReduce +}; diff --git a/packages/turf/package.json b/packages/turf/package.json index 0b791b1bc6..5dfff52104 100644 --- a/packages/turf/package.json +++ b/packages/turf/package.json @@ -3,9 +3,11 @@ "version": "4.4.0", "description": "a JavaScript library for performing geospatial operations with GeoJSON", "main": "index.js", + "module": "module.js", "types": "index.d.ts", "files": [ "index.js", + "module.js", "index.d.ts", "turf.js", "turf.min.js",