In this section I will be writing about my own js path fining solution that I put together after studying the source code of the PathFinding.js repo. I have not battle tested this, but the basic idea seems to work okay. The solution makes use of a grid that is created by another dependency that I am also going to go over in this section. Creating a Grid module is a whole other can of worms, but is also closely rated to path finding so the two need to work out okay with each other.
First off I need some kind of Grid module, or at least decide on some kind of standard format for a grid.
Here is the actual pathfinder module that I worked out bases very loosely on the AStarFinder method of pathfinding.js with many changes. The basic idea of any path finding method is to start at one node location of a grid, get the neighboring nodes, and then find which node would be the best option to move to next. This process is then repeated until a path to an end node is obtained or it is found that getting there is not possible.
So now that I have my grid library and by path finder worked out I can now work out some examples that make use of it.