Parse HTML script tags into JSON.
(TOC generated by verb using markdown-toc)
Install with npm:
$ npm install script-tags --save
Install with bower:
bower install script-tags
html: pass a string of HTML with the script tags to be parsedattrs property and a html property.Example:
var scripts = require('script-tags');
console.log(scripts('<script src="bootstrap.js"></script>'));
//=> [{ "attrs": { "src": "bootstrap.js" }, "html": ""}]
See example.
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 05, 2016.