MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / normalizeRegister

Function normalizeRegister

libs/echarts/echarts-en.simple.js:29403–29426  ·  view source on GitHub ↗

* @param {Object|Function} fn: {seriesType, createOnAllSeries, performRawSeries, reset}

(targetList, priority, fn, defaultPriority, visualType)

Source from the content-addressed store, hash-verified

29401 * @param {Object|Function} fn: {seriesType, createOnAllSeries, performRawSeries, reset}
29402 */
29403function normalizeRegister(targetList, priority, fn, defaultPriority, visualType) {
29404 if (isFunction(priority) || isObject(priority)) {
29405 fn = priority;
29406 priority = defaultPriority;
29407 }
29408
29409 if (__DEV__) {
29410 if (isNaN(priority) || priority == null) {
29411 throw new Error('Illegal priority');
29412 }
29413 // Check duplicate
29414 each(targetList, function (wrap) {
29415 assert(wrap.__raw !== fn);
29416 });
29417 }
29418
29419 var stageHandler = Scheduler.wrapStageHandler(fn, visualType);
29420
29421 stageHandler.__prio = priority;
29422 stageHandler.__raw = fn;
29423 targetList.push(stageHandler);
29424
29425 return stageHandler;
29426}
29427
29428/**
29429 * @param {string} name

Callers 3

registerProcessorFunction · 0.70
registerLayoutFunction · 0.70
registerVisualFunction · 0.70

Calls 3

eachFunction · 0.85
pushMethod · 0.80
isObjectFunction · 0.50

Tested by

no test coverage detected