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 🙏

© 2024 – Pkg Stats / Ryan Hefner

applist

v0.0.4

Published

Get list of active applications running platform agnostic

Downloads

7

Readme

node-applist

A library to get list of active processes / applications

If You Are Submitting Bugs or Issues

Verify that the node version you are using is a stable version; it has an even major release number. Unstable versions are currently not supported and issues created while using an unstable version will be closed.

If you are on a stable version of node, please provide a sufficient code snippet or log files for installation issues. The code snippet does not require you to include confidential information. However, it must provide enough information such that the problem can be replicable. Issues which are closed without resolution often lack required information for replication.

Version Compatibility

| Node Version | Support | | -------------- | -------------- | | 0.4 | OK | | 0.6, 0.8, 0.10 | OK | | 0.11 | OK | | 4 | OK | | 8 | OK | | 10, 11 | OK | | 12 (nightly) | OK |

node-gyp only works with stable/released versions of node. Since the applist module uses node-gyp to build and install, you'll need a stable version of node to use applist. If you do not, you'll likely see an error that starts with:

gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead

Security Issues And Concerns

applist uses platform native code to get list of active applications. Current implementation does only return list of process names in unix environment scanning /proc and windows platform using Wtsapi32 api.

As should be the case with any security tool, this library should be scrutinized by anyone using it. If you find or suspect an issue with the code, please bring it to my attention and I'll spend some time trying to make sure that this tool is as secure as possible.

Dependencies

  • NodeJS
  • node-gyp
  • Please check the dependencies for this tool at: https://github.com/nodejs/node-gyp
  • Windows users will need the options for c++ installed with their visual studio instance.
  • Python 2.x

Install via NPM

npm install applist

Note: OS X users using Xcode 4.3.1 or above may need to run the following command in their terminal prior to installing if errors occur regarding xcodebuild: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Pre-built binaries for various NodeJS versions are made available on a best-effort basis.

Only the current stable and supported LTS releases are actively tested against. Please note that there may be an interval between the release of the module and the availability of the compiled modules.

Currently, we have pre-built binaries that support the following platforms:

  1. Windows x32 and x64
  2. Linux x64 (GlibC targets only). Pre-built binaries for MUSL targets such as Apline Linux are not available.
  3. macOS

If you face an error like this:

node-pre-gyp ERR! Tried to download(404): https://github.com/nowakcasimir/node-applist/releases/download/v0.0.1/applist_lib-v0.0.1-node-v60-linux-x64.tar.gz

make sure you have the appropriate dependencies installed and configured for your platform.

Usage

const applist = require('applist');

To get list of active processes

async (recommended)

applist.list(function(err, list) {
    console.log(list)
});

with promises

applist uses whatever Promise implementation is available in global.Promise. NodeJS >= 0.12 has a native Promise implementation built in. However, this should work in any Promises/A+ compliant implementation.

Async methods that accept a callback, return a Promise when callback is not specified if Promise support is available.

applist.list().then(function(list) {
    console.log(list)
});

This is also compatible with async/await

async function getlist() {
    const list = await applist.list();
    //...
}

sync

var list = applist.listSync()

API

applist.

  • list(cb)
    • cb - [OPTIONAL] - a callback to be fired once the list has been generated. uses eio making it asynchronous. If cb is not specified, a Promise is returned if Promise support is available.
      • err - First parameter to the callback detailing any errors.
      • list - Second parameter to the callback providing the active list of process names (strings).
  • listSync()

Testing

If you create a pull request, tests better pass :)

npm install
npm test

Credits

The code for this comes from a few sources:

  • node.bcrypt.js - for the native node module framework

License

Unless stated elsewhere, file headers or otherwise, the license as stated in the LICENSE file.