MCPcopy
hub / github.com/baidu/amis / resolve

Function resolve

packages/amis-editor-core/src/store/editor.ts:902–923  ·  view source on GitHub ↗
(
          value: any,
          prefixPaths: Array<string> = []
        )

Source from the content-addressed store, hash-verified

900
901 let paths: Array<string> = [];
902 let resolve = (
903 value: any,
904 prefixPaths: Array<string> = []
905 ): boolean => {
906 if (
907 Array.isArray(value) &&
908 value.some((value, index) =>
909 resolve(value, prefixPaths.concat(`${index}`))
910 )
911 ) {
912 return true;
913 } else if (isPlainObject(value)) {
914 return Object.keys(value).some(key => {
915 return resolve(value[key], prefixPaths.concat(key));
916 });
917 } else if (value === '$$') {
918 paths = prefixPaths.concat();
919 return true;
920 }
921
922 return false;
923 };
924
925 resolve(slot);
926

Callers 15

getPluginsFunction · 0.85
getPluginsFunction · 0.85
openFeedbackMethod · 0.85
handleActionMethod · 0.85
menuDomMethod · 0.85
handleActionMethod · 0.85
openFeedbackMethod · 0.85
openFeedbackMethod · 0.85
openFeedbackMethod · 0.85
handleActionMethod · 0.85
handleActionMethod · 0.85
openFeedbackMethod · 0.85

Calls 1

keysMethod · 0.80

Tested by 2

waitFunction · 0.68
waitFunction · 0.68