{"name":"@turf/random","version":"7.0.0-alpha.0","keywords":["turf","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/random@7.0.0-alpha.0","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"dfe467a806a674f337f3db1d6b9a1b2f6a5c6f61","tarball":"http://registry-npm.ywwl.com/@turf/random/download/@turf/random-7.0.0-alpha.0.tgz","fileCount":7,"integrity":"sha512-qTyyhw/zd4mp8qcgNpLkxXfOBu1Ek2EO7dV7KHvfjOJWrbuPW+Ocb41Mc6f/pxcH40H43axDtFvgKalbq6u3xg==","signatures":[{"sig":"MEUCIG8cOmhtOzb4ihqnjqtaAIcAj1xD9T+VrpVJHTeqLC/rAiEA6H/EhsnjX61JcPbj0ZmdVx0hRPEXWCDnlgaExRQ7OPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja8OjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpthw//Zaf4VA4KtyfLTKzAcvTLorR1owbwZYxsrAVecg5DNytQsDCn\r\n+hFoRoLDpvhuJ7vRbghBYEfh13H4yBtbiyJAc4c4ca4s9wpxJRXP8fxbWoky\r\nLZfTCivv8/OndWWKfY6Qe+aEO8iNrdOt5Z2k30rO2BAPlD0WAEcOi/ob7nnX\r\nS/B4urDAvgIJeSJ3NIEw+KndHDXPfmHo2G9ZJyK66j0hoIzNKKPfNPDZ89Xn\r\nI7ddeBc2CnrzUu009qIvNkCXbMEAK6ELLAizThuOWH2Ux88+hp6xIDO1UYWF\r\njKj1pzD7iZYoko+2Upwmpjyd4XmX0u2I7nDt95ETH4WdvqfX0FkzyC7h0Odq\r\nk0QXP4yVc160Bmb7ocgTrr9w5MLL2afhwYxEPecTr3JNImDJmKrDIvYko6gc\r\n9nZfxrYXzf3FGYUyAJi2Q+sXzCbxijLiGMBa3MrtTGuyWheMPSeW1lSFAdK6\r\nj+icVSPh+3wG2UncUmApXbSacnLktNKUng0CjyXCcaNXAo7+i4pf0i+O0OIU\r\ntZPLKXIvJwlCrKNTnIree16Fe5q+bI/vgD0NzhWLPqIG91NZKds0MIXbcAJF\r\nnUzB3GXpnh8XDI5UZ/TTHp36Jq21JlmThV9CdoLMRAwe/E993fVSvqp2B0kc\r\nXu+BGEvOmo8Kat0+BUHoKiirv5snyIzqTHQ=\r\n=skzm\r\n-----END PGP SIGNATURE-----\r\n","size":4654,"noattachment":false,"key":"/@turf/random/-/@turf/random-7.0.0-alpha.0.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","exports":{".":{"import":"./dist/es/index.js","require":"./dist/js/index.js"},"./package.json":"./package.json"},"funding":"https://opencollective.com/turf","gitHead":"0edc4c491b999e5ace770a61e1cf549f7c004189","scripts":{"docs":"node ../../scripts/generate-readmes","test":"npm-run-all test:*","bench":"ts-node bench.js","build":"npm-run-all build:*","build:es":"tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json","build:js":"tsc","test:tape":"ts-node -r esm test.js"},"_npmUser":{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v19.0.1+arm64 (darwin)","description":"turf random module","directories":{},"sideEffects":false,"_nodeVersion":"19.0.1","dependencies":{"tslib":"^2.3.0","@turf/helpers":"^7.0.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"glob":"*","tape":"*","tslint":"*","ts-node":"*","benchmark":"*","typescript":"*","@types/tape":"*","npm-run-all":"*"},"_npmOperationalInternal":{"tmp":"tmp/random_7.0.0-alpha.0_1668006819700_0.5043758037328012","host":"s3://npm-registry-packages"},"readme":"# @turf/random\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## randomPosition\n\nReturns a random position within a [bounding box][1].\n\n### Parameters\n\n*   `bbox` **[BBox][1]** a bounding box inside of which positions are placed. (optional, default `[-180,-90,180,90]`)\n\n### Examples\n\n```javascript\nvar position = turf.randomPosition([-180, -90, 180, 90])\n// => position\n```\n\n*   Throws **[Error][2]** if bbox is invalid\n\nReturns **[Position][3]** Position \\[longitude, latitude]\n\n## randomPoint\n\nReturns a random [point][4].\n\n### Parameters\n\n*   `count` **[number][5]** how many geometries will be generated (optional, default `1`)\n*   `options` **[Object][6]** Optional parameters (optional, default `{}`)\n\n    *   `options.bbox` **[BBox][1]** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)\n\n### Examples\n\n```javascript\nvar points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n// => points\n```\n\n*   Throws **[Error][2]** if bbox is invalid\n\nReturns **[FeatureCollection][7]<[Point][8]>** GeoJSON FeatureCollection of points\n\n## randomPolygon\n\nReturns a random [polygon][9].\n\n### Parameters\n\n*   `count` **[number][5]** how many geometries will be generated (optional, default `1`)\n*   `options` **[Object][6]** Optional parameters (optional, default `{}`)\n\n    *   `options.bbox` **[BBox][1]** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)\n    *   `options.num_vertices` **[number][5]** is how many coordinates each LineString will contain. (optional, default `10`)\n    *   `options.max_radial_length` **[number][5]** is the maximum number of decimal degrees latitude or longitude that a\n        vertex can reach out of the center of the Polygon. (optional, default `10`)\n\n### Examples\n\n```javascript\nvar polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n// => polygons\n```\n\n*   Throws **[Error][2]** if bbox is invalid\n\nReturns **[FeatureCollection][7]<[Polygon][10]>** GeoJSON FeatureCollection of polygons\n\n## randomLineString\n\nReturns a random [LineString][11].\n\n### Parameters\n\n*   `count` **[number][5]** how many geometries will be generated (optional, default `1`)\n*   `options` **[Object][6]** Optional parameters (optional, default `{}`)\n\n    *   `options.bbox` **[BBox][1]** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)\n    *   `options.num_vertices` **[number][5]** is how many coordinates each LineString will contain. (optional, default `10`)\n    *   `options.max_length` **[number][5]** is the maximum number of decimal degrees that a\n        vertex can be from its predecessor (optional, default `0.0001`)\n    *   `options.max_rotation` **[number][5]** is the maximum number of radians that a\n        line segment can turn from the previous segment. (optional, default `Math.PI/8`)\n\n### Examples\n\n```javascript\nvar lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n// => lineStrings\n```\n\n*   Throws **[Error][2]** if bbox is invalid\n\nReturns **[FeatureCollection][7]<[LineString][11]>** GeoJSON FeatureCollection of linestrings\n\n[1]: https://tools.ietf.org/html/rfc7946#section-5\n\n[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\n\n[3]: https://developer.mozilla.org/docs/Web/API/Position\n\n[4]: point\n\n[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[7]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[8]: https://tools.ietf.org/html/rfc7946#section-3.1.2\n\n[9]: polygon\n\n[10]: https://tools.ietf.org/html/rfc7946#section-3.1.6\n\n[11]: https://tools.ietf.org/html/rfc7946#section-3.1.4\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/random\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":1668006819798,"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":1668006819798,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}