slew
Loading big data files in the browser can be a pain. Slew is here to help,
providing streaming loaders for CSV and JSON data. Just add the included
bundle.js
or bundle.min.js
to your document's head:
You can also link directly to the Browserify CDN-hosted build at: https://wzrd.in/standalone/slew@latest
slew.csv(url, [options,] callback)
Streams CSV row-by-row with csv-parser, providing a stream to the
callback function. The optional options
object allows you to set
parsing parameters, such as separator
and newline
.
slew;
slew.json(url, [path,] callback)
Streams JSON, emitting a data
event whenever the optional
JSONStream path is matched in the output:
/* * e.g., if your data looks like: * { results: [ ... ] } */slew;