Show a data stream in a browser. This automatically detects the extension, and displays the data intelligently, supporting video, audio, and images (thanks to render-media).
It will attempt to display filetypes intelligently, like .csv, .json, and .geojson!
npm install render-data
var data = require('render-data')
var file = {
name: 'stuff.R',
createReadStream: function () {
return fs.createReadStream('/path/to/my/data/and/stuff')
}
}
data.render(file, elem, opts, function (err) {
console.log('done rendering')
})
Example in yo-fs.