MCPcopy
hub / github.com/angular/angular-cli / extname

Function extname

packages/angular_devkit/core/src/virtual-fs/path.ts:70–78  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

68 *
69 */
70export function extname(path: Path): string {
71 const base = basename(path);
72 const i = base.lastIndexOf('.');
73 if (i < 1) {
74 return '';
75 } else {
76 return base.slice(i);
77 }
78}
79
80/**
81 * Return the basename of the path, as a Path. See path.basename

Callers 4

potentialSassImportsFunction · 0.85
addProxyConfigFunction · 0.85
callbackMethod · 0.85
getProjectStyleLanguageFunction · 0.85

Calls 1

basenameFunction · 0.85

Tested by

no test coverage detected