MCPcopy Create free account
hub / github.com/chart-kit/react-native-chart-kit-example / getQueryString

Function getQueryString

src/showcase/navigation.ts:27–40  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

25};
26
27const getQueryString = (url: string) => {
28 const queryStart = url.indexOf("?");
29
30 if (queryStart === -1) {
31 return "";
32 }
33
34 const fragmentStart = url.indexOf("#", queryStart);
35
36 return url.slice(
37 queryStart + 1,
38 fragmentStart === -1 ? undefined : fragmentStart,
39 );
40};
41
42export const createShowcaseSearchParams = (
43 queryString: string,

Calls

no outgoing calls

Tested by

no test coverage detected