{"name":"@turf/invariant","version":"6.2.0-alpha.3","keywords":["turf","invariant","expectations"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/invariant@6.2.0-alpha.3","maintainers":[{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.org"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"deniscarriere","email":"carriere.denis@gmail.com"}],"contributors":[{"name":"Tom MacWright","email":"@tmcw"},{"name":"Denis Carriere","email":"@DenisCarriere"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"d4d914a5042487e52c0a280ac4a6181ede52a0a3","tarball":"http://registry-npm.ywwl.com/@turf/invariant/download/@turf/invariant-6.2.0-alpha.3.tgz","fileCount":7,"integrity":"sha512-mbLRfBiJZ4Tr8oPCrTeGvU/UUeze0IQb1WgwgvLaF0eRRnY1FuoE9dDlSM/hXQzzIGAGBV+jwwrycQ/ThsEfaA==","signatures":[{"sig":"MEUCIDKKrSwDdwRFPV/rVYidWquUF9+OrjxMSu0H+G+jWT2wAiEA6dgFN4QGTrXdFS8bIxlRyRqQzjITZihjSKyi4PmGzXE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0o1RCRA9TVsSAnZWagAAqfUP/3m1zh7jxYgOItA+8fUQ\npo0Cn8YTsdaZNj1ovRqkBifLALPTxeh8+HshinfvPl8ZRgHurNCTxMTRqsu+\nyV5zy+wzuNjdgKQv1k0vSNlu654++cOkgdsEvPIC7k9oUnFjnWO7/0Nhs33j\n2HIXyBVsKUpQw6sYJqcc0m1TFEx5nhOd1e4mdREhmDwASn7OpGrVRiJWV4x7\n9DakbqmV25gGIi/3O4y0ufxDrzjXjLOr6KXJYy/RxGyO1DOkjkiCP3AtsfKF\ncg6+671lOtTXU9NRu4nmf7IMxRt//n+WR4yeVdRXeVng04EB/lMxULjcMB+K\nA2/wBluj3zmbQQX4mjDG4CxSg52dhybpDWXl/1YakQRQEAaSciEBUi3PE53x\ntLfgrP+izJJMn7qdoFyICfv4y2m3aVywAA5I0jn+b6351R70nrY85tICGyLK\nkb/gAKDyAFdSuzSinvQnYzoEmgIcL0pdOfEh3zJWlroYsnMYKK6CrP2B+9vr\nUglAylML//EYOFKMMhiQ7kpVohWUIEgYuL84vmr/sjM75NNx//N1bOX0Kk4C\nklQQiDk4QjEz7XF1Ho55YGCZfwpYsVID8HXnU0kb0JoSqKaK8PNQM84w8HxQ\n/1FtNT91Vr9KkIGTUPk8ssxbRvYuBz1jRsw6LvZLvIA+Z6pYV8xW1TbS5oJU\nNFyY\r\n=KH5p\r\n-----END PGP SIGNATURE-----\r\n","size":4691,"noattachment":false,"key":"/@turf/invariant/-/@turf/invariant-6.2.0-alpha.3.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","readme":"# @turf/invariant\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## getCoord\n\nUnwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n\n**Parameters**\n\n-   `coord` **([Array][1]&lt;[number][2]> | [Geometry][3]&lt;[Point][4]> | [Feature][5]&lt;[Point][4]>)** GeoJSON Point or an Array of numbers\n\n**Examples**\n\n```javascript\nvar pt = turf.point([10, 10]);\n\nvar coord = turf.getCoord(pt);\n//= [10, 10]\n```\n\nReturns **[Array][1]&lt;[number][2]>** coordinates\n\n## getCoords\n\nUnwrap coordinates from a Feature, Geometry Object or an Array\n\n**Parameters**\n\n-   `coords` **([Array][1]&lt;any> | [Geometry][3] \\| [Feature][5])** Feature, Geometry Object or an Array\n\n**Examples**\n\n```javascript\nvar poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n\nvar coords = turf.getCoords(poly);\n//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n```\n\nReturns **[Array][1]&lt;any>** coordinates\n\n## containsNumber\n\nChecks if coordinates contains a number\n\n**Parameters**\n\n-   `coordinates` **[Array][1]&lt;any>** GeoJSON Coordinates\n\nReturns **[boolean][6]** true if Array contains a number\n\n## geojsonType\n\nEnforce expectations about types of GeoJSON objects for Turf.\n\n**Parameters**\n\n-   `value` **[GeoJSON][7]** any GeoJSON object\n-   `type` **[string][8]** expected GeoJSON type\n-   `name` **[string][8]** name of calling function\n\n\n-   Throws **[Error][9]** if value is not the expected type.\n\n## featureOf\n\nEnforce expectations about types of [Feature][10] inputs for Turf.\nInternally this uses [geojsonType][11] to judge geometry types.\n\n**Parameters**\n\n-   `feature` **[Feature][5]** a feature with an expected geometry type\n-   `type` **[string][8]** expected GeoJSON type\n-   `name` **[string][8]** name of calling function\n\n\n-   Throws **[Error][9]** error if value is not the expected type.\n\n## collectionOf\n\nEnforce expectations about types of [FeatureCollection][12] inputs for Turf.\nInternally this uses [geojsonType][11] to judge geometry types.\n\n**Parameters**\n\n-   `featureCollection` **[FeatureCollection][13]** a FeatureCollection for which features will be judged\n-   `type` **[string][8]** expected GeoJSON type\n-   `name` **[string][8]** name of calling function\n\n\n-   Throws **[Error][9]** if value is not the expected type.\n\n## getGeom\n\nGet Geometry from Feature or Geometry Object\n\n**Parameters**\n\n-   `geojson` **([Feature][5] \\| [Geometry][3])** GeoJSON Feature or Geometry Object\n\n**Examples**\n\n```javascript\nvar point = {\n  \"type\": \"Feature\",\n  \"properties\": {},\n  \"geometry\": {\n    \"type\": \"Point\",\n    \"coordinates\": [110, 40]\n  }\n}\nvar geom = turf.getGeom(point)\n//={\"type\": \"Point\", \"coordinates\": [110, 40]}\n```\n\n-   Throws **[Error][9]** if geojson is not a Feature or Geometry Object\n\nReturns **([Geometry][3] | null)** GeoJSON Geometry Object\n\n## getGeomType\n\nGet Geometry Type from Feature or Geometry Object\n\n-   Throws **[Error][9]** **DEPRECATED** in v5.0.0 in favor of getType\n\n## getType\n\nGet GeoJSON object's type, Geometry type is prioritize.\n\n**Parameters**\n\n-   `geojson` **[GeoJSON][7]** GeoJSON object\n-   `name` **[string][8]** name of the variable to display in error message (optional, default `\"geojson\"`)\n\n**Examples**\n\n```javascript\nvar point = {\n  \"type\": \"Feature\",\n  \"properties\": {},\n  \"geometry\": {\n    \"type\": \"Point\",\n    \"coordinates\": [110, 40]\n  }\n}\nvar geom = turf.getType(point)\n//=\"Point\"\n```\n\nReturns **[string][8]** GeoJSON type\n\n[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array\n\n[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[3]: https://tools.ietf.org/html/rfc7946#section-3.1\n\n[4]: https://tools.ietf.org/html/rfc7946#section-3.1.2\n\n[5]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n\n[7]: https://tools.ietf.org/html/rfc7946#section-3\n\n[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String\n\n[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\n\n[10]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[11]: #geojsontype\n\n[12]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[13]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n<!-- This file is automatically generated. Please don't edit it directly:\nif you find an error, edit the source file (likely index.js), and re-run\n./scripts/generate-readmes in the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](http://turfjs.org/), an open source\nmodule collection dedicated to geographic algorithms. It is maintained in the\n[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create\nPRs and issues.\n\n### Installation\n\nInstall this module individually:\n\n```sh\n$ npm install @turf/invariant\n```\n\nOr install the Turf module that includes it as a function:\n\n```sh\n$ npm install @turf/turf\n```\n","exports":{"import":"./dist/es/index.js","require":"./dist/js/index.js"},"gitHead":"dce9edfc705352e8cb9e0083c9330ba0e8d77409","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","test:types":"tsc --esModuleInterop --noEmit types.ts"},"_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 invariant module","directories":{},"sideEffects":false,"_nodeVersion":"13.10.1","dependencies":{"@turf/helpers":"^6.2.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tape":"*","tslint":"*","ts-node":"*","benchmark":"*","typescript":"*","npm-run-all":"*"},"_npmOperationalInternal":{"tmp":"tmp/invariant_6.2.0-alpha.3_1607634250812_0.32536084531037224","host":"s3://npm-registry-packages"},"publish_time":1607634257345,"_cnpm_publish_time":1607634257345,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}