MCPcopy Index your code
hub / github.com/apache/echarts / storeToInputDict

Function storeToInputDict

test/lib/testHelper.js:771–800  ·  view source on GitHub ↗
(inputDefine, inputCreated, inputRecorderSetupInputId)

Source from the content-addressed store, hash-verified

769 }
770
771 function storeToInputDict(inputDefine, inputCreated, inputRecorderSetupInputId) {
772 var id = retrieveId(inputDefine, 'id');
773 if (id != null) {
774 id = '' + id;
775 if (_inputsDict[id]) {
776 throw new Error(errMsgPrefix + ' Duplicate input id: ' + id);
777 }
778 }
779 if (id == null) {
780 var text = retrieveValue(inputDefine.text, '') + '';
781 if (text) {
782 var textBasedId = '__inputs|' + text + '|';
783 if (!_inputsDict[textBasedId]) {
784 id = textBasedId;
785 }
786 }
787 }
788 if (id == null) {
789 id = generateNonPersistentId('__inputs_non_persist');
790 assert(!_inputsDict[id]);
791 inputCreated.idCanNotPersist = true;
792 }
793 inputCreated.id = id;
794 inputCreated.__inputDefine = inputDefine;
795 _inputsDict[id] = inputCreated;
796 if (inputRecorderSetupInputId) {
797 inputRecorderSetupInputId(id);
798 }
799 return id;
800 }
801
802 function retrieveAndVerifyGroup(groupId) {
803 var groupCreated = _inputsDict[groupId];

Callers 2

dealInitEachInputFunction · 0.85
createGroupSetInputFunction · 0.85

Calls 3

retrieveIdFunction · 0.85
generateNonPersistentIdFunction · 0.85
assertFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…