How to use the vega-loader.responseType function in vega-loader

To help you get started, we’ve selected a few vega-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vega / vega / packages / vega-dataflow / src / dataflow / load.js View on Github external
export async function request(url, format) {
  const df = this;
  let status = 0, data;

  try {
    data = await df.loader().load(url, {
      context: 'dataflow',
      response: responseType(format && format.type)
    });
    try {
      data = parse(data, format);
    } catch (err) {
      status = -2;
      df.warn('Data ingestion failed', url, err);
    }
  } catch (err) {
    status = -1;
    df.warn('Loading failed', url, err);
  }

  return {data, status};
}

vega-loader

Network request and file loading utilities.

BSD-3-Clause
Latest version published 6 months ago

Package Health Score

88 / 100
Full package analysis