MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / PathActionMap

Function PathActionMap

Examples/UIExplorer/js/URIActionMap.js:37–49  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

35import type { UIExplorerAction } from './UIExplorerActions';
36
37function PathActionMap(path: string): ?UIExplorerAction {
38 // Warning! Hacky parsing for example code. Use a library for this!
39 const exampleParts = path.split('/example/');
40 const exampleKey = exampleParts[1];
41 if (exampleKey) {
42 if (!UIExplorerList.Modules[exampleKey]) {
43 Alert.alert(`${exampleKey} example could not be found!`);
44 return null;
45 }
46 return UIExplorerActions.ExampleAction(exampleKey);
47 }
48 return null;
49}
50
51function URIActionMap(uri: ?string): ?UIExplorerAction {
52 if (!uri) {

Callers 1

URIActionMapFunction · 0.85

Calls 1

alertMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…