Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
20
Frontend-Learner/node_modules/is-installed-globally/index.js
generated
vendored
Normal file
20
Frontend-Learner/node_modules/is-installed-globally/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import globalDirectory from 'global-directory';
|
||||
import isPathInside from 'is-path-inside';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const isInstalledGlobally = (() => {
|
||||
try {
|
||||
return (
|
||||
isPathInside(__dirname, globalDirectory.yarn.packages)
|
||||
|| isPathInside(__dirname, fs.realpathSync(globalDirectory.npm.packages))
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
|
||||
export default isInstalledGlobally;
|
||||
Loading…
Add table
Add a link
Reference in a new issue