komeilmehranfar / sudoku-core

A typescript Sudoku package for generating, solving (step-by-step or all), and analyzing Sudoku boards with ease. Perfect for building Sudoku games and integrating Sudoku functionality into your applications.
https://www.npmjs.com/package/sudoku-core
MIT License
93 stars 3 forks source link

Async calls #2

Open janroures opened 6 months ago

janroures commented 6 months ago

Hi, are there any plans to make the "generate" method asynchronous? It can block the UI up to 10 seconds if computed in the front-end. Thank you.

komeilmehranfar commented 6 months ago

I think It depends on how you can implement it. for example, maybe you can wrap the generate method behind an API-endpoint or use tools to run the code on workers. Look at this repo: https://github.com/developit/workerize