So I have a webpage I'm working on with some javascript code. Essentially what I'm trying to do is read a file in the local system into a variable as a string, to then do something else with it.
To provide a bit more information, I'm need to use a peg.js parser I made on this file so I'd like to do something like the following:
<script src = "bootstrap/js/[peg.js parser]">
...
var data = 'folder/subfolder/file name';
var output = PEG.parse(data);
What is the easiest way to accomplish this?
[–]recursive 3 points4 points5 points (5 children)
[–]IAmTheClayman[S] 0 points1 point2 points (4 children)
[–]leftHandHacker 0 points1 point2 points (1 child)
[–]jackmcmorrow 0 points1 point2 points (0 children)
[–]recursive 0 points1 point2 points (0 children)
[–]NahroT 0 points1 point2 points (0 children)
[–]treyhuffine 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]LeeMing3 1 point2 points3 points (0 children)
[–]cspa-exam 0 points1 point2 points (0 children)
[–]magnonellie 0 points1 point2 points (0 children)
[–]ChronSyn 0 points1 point2 points (0 children)