UNPKG

@rize-io/active-win

Version:

Get metadata about the active window (title, id, bounds, owner, URL, etc)

13 lines (9 loc) 350 B
const binary = require('@mapbox/node-pre-gyp'); const path = require('path'); const fs = require('fs'); const bindingPath = binary.find(path.resolve(path.join(__dirname, '../package.json'))); const binding = (fs.existsSync(bindingPath)) ? require(bindingPath) : { getActiveWindow: () => {}, getOpenWindows: () => {} }; module.exports = binding;