Skip to content

Commit e3e5d02

Browse files
committed
Remove sanitizePath function
Its only call point has been removed.
1 parent abbc6c2 commit e3e5d02

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

packages/doxdox-core/src/utils.test.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
isDirectory,
1111
isFile,
1212
parseConfigFromCLI,
13-
parseIgnoreConfig,
14-
sanitizePath,
13+
parseIgnoreConfig
1514
slugify
1615
} from './utils';
1716

@@ -169,18 +168,6 @@ describe('utils', () => {
169168
});
170169
});
171170

172-
describe('sanitizePath', () => {
173-
it('sanitize path', () => {
174-
expect(
175-
sanitizePath(
176-
'file:///Users/scottdoxey/git/github/doxdox/packages/doxdox-cli/dist/src/index.js'
177-
)
178-
).toEqual(
179-
'/Users/scottdoxey/git/github/doxdox/packages/doxdox-cli/dist/src/index.js'
180-
);
181-
});
182-
});
183-
184171
describe('slugify', () => {
185172
it('slugify path', () => {
186173
expect(slugify('./src/utils.ts')).toEqual('src-utils-ts');

packages/doxdox-core/src/utils.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,6 @@ export const parseIgnoreConfig = (contents: string): string[] =>
191191
.filter(line => line.trim())
192192
.map(line => `!${line.trim().replace(/^!/, '')}`);
193193

194-
/**
195-
* Sanitizes given path or url.
196-
*
197-
* @param {string} [url] Path or url.
198-
* @return {Promise<string>} Sanitized path.
199-
* @public
200-
*/
201-
202-
export const sanitizePath = (path: string): string => new URL(path).pathname;
203-
204194
/**
205195
* Slugify a value for use as an anchor.
206196
*

0 commit comments

Comments
 (0)