active-window-listener
Advanced tools
Comparing version 1.0.4 to 1.0.5
22
index.ts
@@ -10,2 +10,3 @@ | ||
openedProcesses: Window[]; | ||
stopLoop: boolean; | ||
constructor(processArr: string[]) { | ||
@@ -16,2 +17,3 @@ this.eventEmitter = new EventEmitter.EventEmitter(); | ||
this.openedProcesses = []; | ||
this.stopLoop = false; | ||
setTimeout(() => { | ||
@@ -22,2 +24,6 @@ this.loop(true); | ||
clearEvent(){ | ||
this.stopLoop = true; | ||
} | ||
changed(cb: (name?: Window) => void) { | ||
@@ -30,3 +36,4 @@ this.eventEmitter.on("changed", window => { | ||
async loop(started?: boolean) { | ||
private async loop(started?: boolean) { | ||
if (this.stopLoop) return; | ||
const processes = windowManager.getWindows(); | ||
@@ -95,13 +102,2 @@ | ||
} | ||
// export function getWindows () { | ||
// const filteredFolder = ["Windows"]; | ||
// const windowsArr = windowManager.getWindows().filter((window, index, self) => { | ||
// const path = window.path.split('\\'); | ||
// if (window.getTitle() === "") return false; | ||
// if (path[1] && filteredFolder.includes(path[1])) return false; | ||
// return index === self.findIndex(w => (w.path === window.path)) | ||
// }) | ||
// return windowsArr | ||
// } | ||
} |
{ | ||
"name": "active-window-listener", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Listen to active windows by specifying them", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
10912
5
143