Spritz style reader in JS