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

@camjn/getargv

v0.0.29

Published

This library allows you to query the arguments of other processes on macOS.

Downloads

53

Readme

Node.js npm version

This module allows you to query the arguments of other processes on macOS.

Module Installation

  • Install libgetargv to your system (see below).

  • Install the module and add to the application's package.json by executing:

    $ npm install --save-optional @camjn/getargv

Saving this module as optional is important because it can only build on macOS, so npm needs to be able to exclude it on other OSs.

Library Installation

  • To get access to libgetargv, sign up for an appropriate sponsorship tier.
  • Clone the libgetargv repo: git clone https://github.com/getargv/getargv.git.
  • Running make install_dylib, installs the library to the /usr/local/ prefix by default; you can change the install location with the PREFIX make variable: make PREFIX=/opt install_dylib.

Building libgetargv

I've built libgetargv on macOS 10.7-13, using only the CLT package, not the full Xcode install. If you need to override variables, do so inside the make command, eg: make EXTRA_CPPFLAGS=-DMACRO EXTRA_CFLAGS=-std=c17 dylib.

Usage

import { get_argv_of_pid as get_argv_of_pid_as_string, get_argv_and_argc_of_pid as get_argv_of_pid_as_array } from "@camjn/getargv";
get_argv_of_pid_as_string(some_process_id) //=> "arg0\x00arg1"
get_argv_of_pid_as_array(some_process_id) //=> ["arg0","arg1"]

Development

After checking out the repo, run npm i to install dependencies. Then, run npm run test to run the tests. You can also run npm run console for an interactive prompt that will allow you to experiment.

TS code goes in the lib dir, C code goes in the src dir.

To install this module onto your local machine, run npm install. To release a new version, run npm version patch to update the version number in package.json and create a git tag for the version, and push git commits and the created tag to the git origin; and then run npm publish, which will push the module to npm.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/getargv/getargv.js.

License

The module is available as open source under the terms of the BSD 3-clause License.