uri.ts ×10

Frontier kind: Code frontier

unlabeled · c_611ef9485910

3499 tests · 3418 LOC · 18 files · introduces 0 tests · 20 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges20 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
491 ranges3418 lines · 18 files · Browse complete extent
All tests (intent)
3499 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 20 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/common/uri.ts 20 introduced LOC · 10 ranges

Open complete file

466
467 override toString(skipEncoding: boolean = false): string {
468 > if (!skipEncoding) { uri.ts
469 if (!this._formatted) {
470 this._formatted = _asFormatted(this, false);
471 }
472 return this._formatted;
473 > } else { uri.ts
474 // we don't cache that
475 return _asFormatted(this, true);
476 }
477 > } uri.ts
478
479 override toJSON(): UriComponents {
654 * Create the external version of a uri
655 */
656 > function _asFormatted(uri: URI, skipEncoding: boolean): string { uri.ts
657 >
658 > const encoder = !skipEncoding
659 ? encodeURIComponentFast
660 : encodeURIComponentMinimal;
661 > uri.ts
662 > let res = '';
663 > let { scheme, authority, path, query, fragment } = uri;
664 > if (scheme) {
665 > res += scheme;
666 > res += ':';
667 > }
668 > if (authority || scheme === 'file') {
669 res += _slash;
670 res += _slash;
671 }
672 > if (authority) { uri.ts
673 let idx = authority.indexOf('@');
674 if (idx !== -1) {
697 }
698 }
699 > if (path) { uri.ts
700 // lower-case windows drive letters in /C:/fff or C:/fff
701 if (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {
713 res += encoder(path, true, false);
714 }
715 > if (query) { uri.ts
716 res += '?';
717 res += encoder(query, false, false);
718 }
719 > if (fragment) { uri.ts
720 res += '#';
721 res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;
722 }
723 > return res; uri.ts
724 > }
725
726 // --- decode