MCPcopy Index your code
hub / github.com/angular/angular / _splitAt

Function _splitAt

packages/compiler/src/util.ts:23–31  ·  view source on GitHub ↗
(
  input: string,
  character: string,
  defaultValues: (string | null)[],
)

Source from the content-addressed store, hash-verified

21}
22
23function _splitAt(
24 input: string,
25 character: string,
26 defaultValues: (string | null)[],
27): (string | null)[] {
28 const characterIndex = input.indexOf(character);
29 if (characterIndex == -1) return defaultValues;
30 return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
31}
32
33export function noUndefined<T>(val: T | undefined): T {
34 return val === undefined ? null! : val;

Callers 2

splitAtColonFunction · 0.85
splitAtPeriodFunction · 0.85

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…