{"id":16126859,"url":"https://github.com/mikolalysenko/poly-bool","last_synced_at":"2025-06-27T00:04:53.548Z","repository":{"id":34463433,"uuid":"38399667","full_name":"mikolalysenko/poly-bool","owner":"mikolalysenko","description":"Exact polygon boolean operations","archived":false,"fork":false,"pushed_at":"2015-07-01T23:33:25.000Z","size":112,"stargazers_count":20,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-21T01:59:02.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikolalysenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-01T23:06:46.000Z","updated_at":"2025-04-02T16:12:50.000Z","dependencies_parsed_at":"2022-07-28T21:09:06.349Z","dependency_job_id":null,"html_url":"https://github.com/mikolalysenko/poly-bool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikolalysenko/poly-bool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fpoly-bool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fpoly-bool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fpoly-bool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fpoly-bool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikolalysenko","download_url":"https://codeload.github.com/mikolalysenko/poly-bool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fpoly-bool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260702474,"owners_count":23049258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T21:40:41.432Z","updated_at":"2025-06-19T06:33:58.607Z","avatar_url":"https://github.com/mikolalysenko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"poly-bool\n=========\nA robust polygon Boolean library in under 20 lines of code! (Excluding dependencies)  Work with *any* kind of polygon, results are accurate to *machine precision*, and under no circumstances will valid input ever crash or produce incorrect output.\n\n# Example\n\n```javascript\nvar polybool = require('poly-bool')\n\nvar a = [[[-1,-1], [-1,1], [1,1], [1,-1]]]\nvar b = [[[0, 0], [0,2], [2,2], [2,0]]]\n\nconsole.log(polybool(a, b, 'sub'))\n```\n\n#### Output\n\n```javascript\n[ [ [ 1, 1 ], [ 1, 0 ], [ 2, 0 ], [ 2, 2 ], [ 0, 2 ], [ 0, 1 ] ] ]\n```\n\n# Install\n\n```\nnpm i poly-bool\n```\n\n# API\n\n#### `require('poly-bool')(a, b, op)`\nComputes a Boolean set operation between `a` and `b`\n\n* `a,b` are polygons represented by lists of loops of points\n* `op` is the operation to apply.  Possible values include `'and', 'or', 'xor', 'sub', 'rsub'`\n\n**Returns** A polygon encoding some boolean combination of the components of `a` and `b`\n\n# License\n(c) 2015 Mikola Lysenko. MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Fpoly-bool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikolalysenko%2Fpoly-bool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Fpoly-bool/lists"}