UNPKG
grib-js
Version:
latest (1.0.0)
1.0.0
Full JavaScript GRIB2 parser
github.com/gmerciel/grib.js
gmerciel/grib.js
grib-js
/
load-data.js
8 lines
•
209 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
const
fs =
require
(
'fs'
);
function
get
(
url, cb
) {
fetch
(url) .
then
(
res
=>
res.
arrayBuffer
()) .
then
(
buff
=>
cb
(
null
, buff)) .
catch
(
err
=>
cb
(err)); }
module
.
exports
= (fs && fs.
readFile
) || get;