From 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Wed, 18 Nov 2020 23:26:45 +0100 Subject: rm node_modules --- node_modules/true-case-path/index.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 node_modules/true-case-path/index.js (limited to 'node_modules/true-case-path/index.js') diff --git a/node_modules/true-case-path/index.js b/node_modules/true-case-path/index.js deleted file mode 100644 index e550a87..0000000 --- a/node_modules/true-case-path/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -var glob = require('glob') -var path = require('path') - -function trueCasePathSync(fsPath) { - - // Normalize the path so as to resolve . and .. components. - // !! As of Node v4.1.1, a path starting with ../ is NOT resolved relative - // !! to the current dir, and glob.sync() below then fails. - // !! When in doubt, resolve with fs.realPathSync() *beforehand*. - var fsPathNormalized = path.normalize(fsPath) - - // OSX: HFS+ stores filenames in NFD (decomposed normal form) Unicode format, - // so we must ensure that the input path is in that format first. - if (process.platform === 'darwin') fsPathNormalized = fsPathNormalized.normalize('NFD') - - // !! Windows: Curiously, the drive component mustn't be part of a glob, - // !! otherwise glob.sync() will invariably match nothing. - // !! Thus, we remove the drive component and instead pass it in as the 'cwd' - // !! (working dir.) property below. - var pathRoot = path.parse(fsPathNormalized).root - var noDrivePath = fsPathNormalized.slice(Math.max(pathRoot.length - 1, 0)) - - // Perform case-insensitive globbing (on Windows, relative to the drive / - // network share) and return the 1st match, if any. - // Fortunately, glob() with nocase case-corrects the input even if it is - // a *literal* path. - return glob.sync(noDrivePath, { nocase: true, cwd: pathRoot })[0] -} - -module.exports = trueCasePathSync -- cgit v1.2.3