MCPcopy
hub / github.com/rollup/rollup / getRelativePath

Function getRelativePath

test/function/samples/shadowed-external-export/main.js:4–7  ·  view source on GitHub ↗
( path, path2 )

Source from the content-addressed store, hash-verified

2
3var paths = {};
4function getRelativePath ( path, path2 ) {
5 paths[ path ] = true;
6 return relative( path, path2 );
7}
8
9assert.equal( getRelativePath( 'foo/bar/baz', 'foo/baz/bar' ), normalize('../../baz/bar') );
10assert.deepEqual( paths, { 'foo/bar/baz': true });

Callers 1

main.jsFile · 0.85

Calls 1

relativeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…