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

Function createSource

_benchmarks/sample_echarts.js:19788–19805  ·  view source on GitHub ↗
(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`.
    sourceFormat, encodeDefine // can be null
    )

Source from the content-addressed store, hash-verified

19786 return val instanceof SourceImpl;
19787 }
19788 function createSource(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`.
19789 sourceFormat, encodeDefine // can be null
19790 ) {
19791 sourceFormat = sourceFormat || detectSourceFormat(sourceData);
19792 var seriesLayoutBy = thisMetaRawOption.seriesLayoutBy;
19793 var determined = determineSourceDimensions(sourceData, sourceFormat, seriesLayoutBy, thisMetaRawOption.sourceHeader, thisMetaRawOption.dimensions);
19794 var source = new SourceImpl({
19795 data: sourceData,
19796 sourceFormat: sourceFormat,
19797 seriesLayoutBy: seriesLayoutBy,
19798 dimensionsDefine: determined.dimensionsDefine,
19799 startIndex: determined.startIndex,
19800 dimensionsDetectedCount: determined.dimensionsDetectedCount,
19801 encodeDefine: makeEncodeDefine(encodeDefine),
19802 metaRawOption: clone(thisMetaRawOption)
19803 });
19804 return source;
19805 }
19806 /**
19807 * Wrap original series data for some compatibility cases.
19808 */

Callers 2

applySingleDataTransformFunction · 0.85
sample_echarts.jsFile · 0.85

Calls 4

detectSourceFormatFunction · 0.85
makeEncodeDefineFunction · 0.85
cloneFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…