MCPcopy
hub / github.com/tdewolff/minify / DefaultDataProvider

Function DefaultDataProvider

_benchmarks/sample_echarts.js:20093–20113  ·  view source on GitHub ↗
(sourceParam, dimSize)

Source from the content-addressed store, hash-verified

20091 /** @class */
20092 function () {
20093 function DefaultDataProvider(sourceParam, dimSize) {
20094 // let source: Source;
20095 var source = !isSourceInstance(sourceParam) ? createSourceFromSeriesDataOption(sourceParam) : sourceParam; // declare source is Source;
20096
20097 this._source = source;
20098 var data = this._data = source.data; // Typed array. TODO IE10+?
20099
20100 if (source.sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {
20101 if ("development" !== 'production') {
20102 if (dimSize == null) {
20103 throw new Error('Typed array data must specify dimension size');
20104 }
20105 }
20106
20107 this._offset = 0;
20108 this._dimSize = dimSize;
20109 this._data = data;
20110 }
20111
20112 mountMethods(this, data, source);
20113 }
20114
20115 DefaultDataProvider.prototype.getSource = function () {
20116 return this._source;

Callers

nothing calls this directly

Calls 2

isSourceInstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…