mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
16 lines
330 B
TypeScript
16 lines
330 B
TypeScript
export let Registry: typeof import('native-reg');
|
|
|
|
export const loadRegistry = () => {
|
|
if (process.platform === 'win32') {
|
|
if (!Registry) {
|
|
try {
|
|
Registry = require('native-reg');
|
|
} catch (error) {
|
|
console.error(error);
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|