Skip to content

juliangruber/huge-text-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huge-text-view

Render text blobs of arbitrary size efficiently in the browser.

Work in progress.

Example

var View = require('huge-text-view')
var bytes = require('bytes')

document.body.style.height = '600px'

const view = new View()
view.lines(Math.ceil(bytes('320gb') / 60))
view.pad(100)
view.fetch((line, cb) => {
  setTimeout(() => {
    cb(null, Buffer.alloc(30).toString('hex'))
  }, Math.random() * 100)
})
view.render(document.body)