{"name":"script-injector","version":"0.1.2","description":"Inject inline javascript into an HTML stream.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/dlmanning/script-injector.git"},"keywords":["html","stream","script","inject","injector","injection","parser"],"author":{"name":"David Manning"},"license":"MIT","dependencies":{"trumpet":"~1.5.0","through":"~2.3.4"},"bugs":{"url":"https://github.com/dlmanning/script-injector/issues"},"_id":"script-injector@0.1.2","dist":{"shasum":"92d5b25f2bd8f10a069ac3eb1ee5ed501d3021e9","tarball":"http://registry-npm.ywwl.com/script-injector/download/script-injector-0.1.2.tgz","integrity":"sha512-duVuKROl7BZS9LiEmxjI8KlL1mePy2jj+ZOB9Jvn3fqV0Kaxyl4oYeSMQ7poEJNPij3NKiFIf3YaxrFvWCHf9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTQwcrek5C21ymUxKKnIqMI6WTNvXBoDBHZ2329N5w2AiAtKXVVKM4wedgkqQe+6EbSXjK9+gRkJBm7ue5Cgpn0+A=="}],"size":1786,"noattachment":false,"key":"/script-injector/-/script-injector-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"dlmanning","email":"dlmanning@me.com"},"maintainers":[{"name":"dlmanning","email":"dlmanning@me.com"}],"directories":{},"readme":"#script-injector\n\n1. provides a through stream that allows you to inject inline javascript into an html text stream.\n2. Uses [`trumpet`](https://github.com/substack/node-trumpet) to parse your html.\n3. Should only be used for good, never for evil\n\n## Installation\n\n`npm install script-injector`\n\n\n## How to use\n\nJust pipe a stream of html through script-injector. You can pass in either some stringified code or a function object. What could be easier?\n\n```javascript\nscriptInjector = require('script-injector');\n\n// Then do something like this somewhere else\n\nfs.createReadStream('anHTMLFile')\n  .pipe(scriptInjector(aFunction))\n  .pipe(someOtherPlace);\n```\n\n`script-injector` will insert the provided code *before* your first script tags, or just before `</body>` if you don't have any other scripts.","publish_time":1374377369707,"_cnpm_publish_time":1374377369707,"dist-tags":{"latest":"1.0.0"}}