Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (24 sloc) 1.15 KB


Build Status NPM version Dependency Status Bitdeli Badge

Inline tiny JS files into your markup without doing something gnarly.


var inliner = require("js-inliner");

inliner(stream, { root : "/fooga/wooga", size : 1024 }, function(err, text) {
    if(err) {
        throw new Error(err);



inliner(stream, [options], cb)

  • stream {Stream} Readable stream to parse
  • options {Object}
  • cb {Function}
    • err {Error | null}
    • text {Buffer} Rewritten text


  • root {String} location on disk to use as the root of URLs. Default is process.cwd().
  • size {Number} maximum size in bytes of files to inline. Default is 1024.
Jump to Line
Something went wrong with that request. Please try again.