{"name":"@turf/random","version":"6.2.0-alpha.1","keywords":["turf","gis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/random@6.2.0-alpha.1","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"635a665a4e618fbddac3b8d57a037d2aa276f929","tarball":"http://registry-npm.ywwl.com/@turf/random/download/@turf/random-6.2.0-alpha.1.tgz","fileCount":6,"integrity":"sha512-t+oM/bcdw4rbrN3IMH+PomI11Nx/n76CKNFxUktLkOrdkTlIFAbpBP81+h/rbbtL2o8cDPXB6p85jmSQnEQVYw==","signatures":[{"sig":"MEUCIAgyn7MKWB0fQde64YAMt5ssdiCXxYvTgKgEDarjHKDkAiEAn6S+APnBVg34mLfs7Bdp6B+sU3CzrEtnbk9BN1a/ypc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefUJQCRA9TVsSAnZWagAAkH0P/3YbY7jB5LDd/yswN7QF\n5n3xvVEUkbUQVHpszXGNfmcT1Wzg9U6l5x1YISlkAqI2O7jej/yTSqzswOmO\nORCDU0SGa7gdDSAkNGJmWIMWlk6Di4V/q+64w7LpUs0EfhbhpGM7RNP/k4d7\neFL4xMhAdRsNyFjabjSqVHFNMY+Mw5fkltO9ZJBJAVMiWOQKmB37EXtA1mKy\n2H0IUcRPpv2nCBqIAGxdWS6lAuyhxub2xYeNjnEMeO84M/74h+mcmAAgfcFd\nwRTDOQJNzlbRoQuQpgRWJfgG1Kcz0HcyXegzzEjoH6CYeehmnwCBypQ4eeu1\nh3G+3ltmGp7Fp1oVJYzF8QvTLfXG+rZO8xroUdn0mrF+6d3nskg42NQ/37Lf\nm9i8VPH9uyP/x+Gm5qTSIclZdRMEMo4/WnimAypR5Q1wq+oO7P9zT+OrgasN\ndIVtemmNPC4eBTsRclL+tRsU9gQFRlz10XNjrp/NvJeGegE4C9R1YQZRxS1u\n5a69ayX2FagMnqx39xyzCJdupYx8fe+uqZERGCMsHE9Y5dbvONpdzxTlKdQR\nbGMNCr9LbmhQyR6Bpw2/9GpaN+lXI8LWNI2VSbtArzEsH/l6bwGiXt8GMVRi\nJE0G7flzVoYpMLapeEXWXVtW4Tb1mjzoA8s6MOQOkYgvKB9hbwSQzQ0dHbOe\nrmM0\r\n=cUEi\r\n-----END PGP SIGNATURE-----\r\n","size":4367,"noattachment":false,"key":"/@turf/random/-/@turf/random-6.2.0-alpha.1.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","gitHead":"fc519c045a8931c1e14eab9160a7e28391f8da02","scripts":{"docs":"node ../../scripts/generate-readmes","test":"npm-run-all prepare test:*","bench":"npm-run-all prepare bench:run","prepare":"npm-run-all prepare:*","bench:run":"node bench.js","test:tape":"node -r esm test.js","prepare:es":"tsc --outDir dist/es --module esnext --declaration false","prepare:js":"tsc"},"_npmUser":{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/3.20.2/node@v13.10.1+x64 (darwin)","description":"turf random module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/helpers":"^6.2.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"*","tape":"*","tslint":"*","benchmark":"*","typescript":"*","@types/tape":"*"},"_npmOperationalInternal":{"tmp":"tmp/random_6.2.0-alpha.1_1585267279829_0.4287178485857295","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":1585267279938,"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":1585267279938,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}