npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

restore-window

v1.1.0

Published

Module to restore or minimize Windows windows by title

Readme

restore-window

CLI + Node.js library to restore or minimize a Windows window by its exact title, available with both synchronous and asynchronous APIs.


🔧 Features

  • Restore a minimized window by title
  • Minimize a visible window by title
  • Zero-JS-shim CLI: invokes the native restore-window.exe directly
  • Node.js API for programmatic control (sync & async)
  • Windows-only (skips install on other platforms)

📦 Installation

npm install -g restore-window

⚠️ Windows only. On non-Windows platforms the installer will warn and exit harmlessly.


🚀 Usage

CLI

Invoke the native binary directly:

restore-window -t "Untitled - Notepad" -restore
restore-window -t "My App"            -minimize
  • -t "<window title>"
  • Exactly one of:
    • -restore
    • -minimize

If the window is not found or already in the requested state, an error or status message is printed.


API

Synchronous (blocking)

const rw = require('restore-window');

// restore a window
try {
  const msg = rw.restoreSync("Untitled - Notepad");
  console.log(msg); // → Window 'Untitled - Notepad' restored.
} catch (err) {
  console.error(err.message);
}

// minimize a window
try {
  const msg = rw.minimizeSync("Calculator");
  console.log(msg); // → Window 'Calculator' minimized.
} catch (err) {
  console.error(err.message);
}

Asynchronous (non-blocking)

const rw = require('restore-window');

(async () => {
  try {
    const msg1 = await rw.restore("Untitled - Notepad");
    console.log(msg1); // → Window 'Untitled - Notepad' restored.

    const msg2 = await rw.minimize("Calculator");
    console.log(msg2); // → Window 'Calculator' minimized.
  } catch (err) {
    console.error(err.message);
  }
})();

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m "feat: add ...")
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

Please ensure all new code is covered by tests and follows the existing style.


📄 License

This project is licensed under the MIT License. See LICENSE for details.