{"name":"@turf/truncate","version":"7.0.0-alpha.115","keywords":["turf","geojson","gis","truncate"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/truncate@7.0.0-alpha.115","contributors":[{"name":"Denis Carriere","email":"@DenisCarriere"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"a558b52d4cdc01571681e1567fb711db2f33826b","tarball":"http://registry-npm.ywwl.com/@turf/truncate/download/@turf/truncate-7.0.0-alpha.115.tgz","fileCount":9,"integrity":"sha512-H1s2aAOR/G9UbGmx7XiXlslpQxSIpSuPqsrpB+0+0+r/lZJ30DWPbQmAYp/5Rpyu+5i0E6PZAm9cujmss2+agw==","signatures":[{"sig":"MEUCIDeMUQJGm9vu933enGsfaWNb+bm6W1CEUMY0iNui2l7tAiEA9yygXOoDDwRlhrW+DFpUuD1rSoqhLkg3IgMniUvJ7tM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19186,"size":4735,"noattachment":false,"key":"/@turf/truncate/-/@turf/truncate-7.0.0-alpha.115.tgz"},"main":"dist/cjs/index.cjs","type":"module","types":"dist/esm/index.d.ts","module":"dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}},"./package.json":"./package.json"},"funding":"https://opencollective.com/turf","gitHead":"c76e6e96eea2a08d55f670333a085535da5371ce","scripts":{"docs":"tsx ../../scripts/generate-readmes.ts","test":"npm-run-all --npm-path npm test:*","bench":"tsx bench.ts","build":"tsup --config ../../tsup.config.ts","test:tape":"tsx test.ts","test:types":"tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"},"_npmUser":{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/7.4.2/node@v18.20.2+x64 (linux)","description":"turf truncate module","directories":{},"sideEffects":false,"_nodeVersion":"18.20.2","dependencies":{"tslib":"^2.6.2","@turf/meta":"^7.0.0-alpha.115+c76e6e96e","@turf/helpers":"^7.0.0-alpha.115+c76e6e96e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsx":"^4.6.2","tape":"^5.7.2","tsup":"^8.0.1","benchmark":"^2.1.4","typescript":"^5.2.2","@types/tape":"^4.2.32","npm-run-all":"^4.1.5","load-json-file":"^7.0.1","write-json-file":"^5.0.0","@types/benchmark":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/truncate_7.0.0-alpha.115_1713899787295_0.186094533912194","host":"s3://npm-registry-packages"},"readme":"# @turf/truncate\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## truncate\n\nTakes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.\n\n### Parameters\n\n*   `geojson` **[GeoJSON][1]** any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.\n*   `options` **[Object][2]** Optional parameters (optional, default `{}`)\n\n    *   `options.precision` **[number][3]** coordinate decimal precision (optional, default `6`)\n    *   `options.coordinates` **[number][3]** maximum number of coordinates (primarly used to remove z coordinates) (optional, default `3`)\n    *   `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)\n\n### Examples\n\n```javascript\nvar point = turf.point([\n    70.46923055566859,\n    58.11088890802906,\n    1508\n]);\nvar options = {precision: 3, coordinates: 2};\nvar truncated = turf.truncate(point, options);\n//=truncated.geometry.coordinates => [70.469, 58.111]\n\n//addToMap\nvar addToMap = [truncated];\n```\n\nReturns **[GeoJSON][1]** layer with truncated geometry\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3\n\n[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n\n<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run \"yarn docs\" from the root of the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues.\n\n### Installation\n\nInstall this single module individually:\n\n```sh\n$ npm install @turf/truncate\n```\n\nOr install the all-encompassing @turf/turf module that includes all modules as functions:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1713899787435,"maintainers":[{"name":"smallsaucepan","email":"james@smallsaucepan.com"},{"name":"morgan.herlocker","email":"morganherlocker@gmail.com"},{"name":"twelch","email":"tim.j.welch@gmail.com"},{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"}],"_cnpm_publish_time":1713899787435,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}