UNPKG

prototxt-parser

Version:

a prototxt parser for js based on parsimmon

27 lines (21 loc) 544 B
<html> <head> </head> <body> <!-- <script src="https://unpkg.com/prototxt-parser"></script> --> <script src="dist/browser/prototxt-parser.min.js"></script> <script> function fetchText(uri) { return fetch(new Request(uri)).then(function(res){ return res.text(); }); } var uri = "deploy.prototxt"; var proto; fetchText(uri).then(function(str){ proto = prototxtParser.parse(str); console.log(proto); }); </script> </body> </html>