Pagefind provides an interface to the indexing binary as a NodeJS package you can import. There are situations where using this Node library is beneficial: Authors integrating Pagefind into an existing project, e.g. integrating Pagefind into the dev mode of a static site generator, can pass in-memory HTML files to Pagefind.
