{"id":20349998,"url":"https://github.com/webbestmaster/a-star-finder","last_synced_at":"2025-06-13T16:41:53.970Z","repository":{"id":57171665,"uuid":"92764720","full_name":"webbestmaster/a-star-finder","owner":"webbestmaster","description":"Generic synchronous/asynchronous A* search algorithm.","archived":false,"fork":false,"pushed_at":"2018-03-23T17:42:06.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T04:23:41.801Z","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/webbestmaster.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":"2017-05-29T18:21:26.000Z","updated_at":"2018-03-23T17:42:07.000Z","dependencies_parsed_at":"2022-08-24T13:30:47.409Z","dependency_job_id":null,"html_url":"https://github.com/webbestmaster/a-star-finder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fa-star-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fa-star-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fa-star-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fa-star-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbestmaster","download_url":"https://codeload.github.com/webbestmaster/a-star-finder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fa-star-finder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258855048,"owners_count":22768690,"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-11-14T22:28:29.625Z","updated_at":"2025-06-13T16:41:53.949Z","avatar_url":"https://github.com/webbestmaster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# a-star-finder\nGeneric synchronous/asynchronous A* search algorithm.\n\n### How to use\n\n```javascript\n// sync version\nconst {getPath} = require('a-star-finder');\n\nconst map = [\n    '··S·###···',   // S and E - Start and End, not required, here is for example only\n    '····#·····',   // · - available to across square, not required, here is for example only\n    '····#E##··',   // # - NOT AVAILABLE to across square, REQUIRED\n    '····###···',\n    '··········'\n];\n\nconst start = [2, 0]; // x and y coordinates, start of path\nconst end = [5, 2]; // x and y coordinates, end of path\nconst path = getPath(map, start, end);\n\nconsole.log(path); // array of square's coordinates [start, [3, 0], [3, 1], ..., [6, 1], [5, 1], end]\n\n// getPath support options\ngetPath(map, start, end, {noPath: '#'}); // noPath will used instead of default not across square\n\n\n// async version\nconst {getPathAsync} = require('a-star-finder');\n\n// getPathAsync support options: getPathAsync(map, start, end, callback, options)\ngetPathAsync(map, start, end, path =\u003e {\n    // here your path\n    console.log(path);\n});\n```\n\nIf end point is unreachable, return null.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fa-star-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbestmaster%2Fa-star-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fa-star-finder/lists"}