MCPcopy Index your code
hub / github.com/angular/angular-cli / parseJsonLines

Function parseJsonLines

packages/angular/cli/src/package-managers/parsers.ts:42–53  ·  view source on GitHub ↗
(output: string, logger?: Logger)

Source from the content-addressed store, hash-verified

40 */
41// eslint-disable-next-line @typescript-eslint/no-explicit-any
42function* parseJsonLines(output: string, logger?: Logger): Generator<any> {
43 for (const line of output.split('\n')) {
44 if (!line.trim()) {
45 continue;
46 }
47 try {
48 yield JSON.parse(line);
49 } catch (e) {
50 logger?.debug(` Ignoring non-JSON line: ${e}`);
51 }
52 }
53}
54
55interface NpmListDependency {
56 version: string;

Callers 5

parseYarnClassicManifestFunction · 0.85
parseYarnClassicMetadataFunction · 0.85
parseYarnClassicErrorFunction · 0.85

Calls 1

debugMethod · 0.65

Tested by

no test coverage detected