So I built Data Janitor (https://www.csvjson.com/datajanitor) a tool to allow users to clean and transform tabular data in the browser running their own JavaScript function. I use Web Workers to isolate the code for security and performance purposes (the user can press Stop to halt the worker).
With regards to security, is this a good idea? What can I do to further bullet proof this concept. I really want the code to run on the user's computer - not server-side. For efficiency and privacy reasons.
Worker JavaScript is here: https://github.com/martindrapeau/csvjson-app/blob/master/js/src/sandbox.js It is called here: https://github.com/martindrapeau/csvjson-app/blob/master/js/src/datajanitor-code.js#L100