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

@pextra/node-lvm

v0.6.1

Published

A NodeJS wrapper for LVM (logical volume manager) written in TypeScript.

Downloads

12

Readme

node-lvm

A NodeJS wrapper for LVM (logical volume manager) written in TypeScript.

Downloads npm dependents Version License

Install

With npm:

npm install @pextra/node-lvm

With bun:

bun install @pextra/node-lvm

Usage

There is one default exported object with three properties: pv, vg, and lv. Each of these properties is an object containing methods for the respective LVM command.

Each command returns an object with three properties: stdout, stderr, and data. stdout and stderr are the raw output from the command. data is the parsed JSON output from the command, if any.

Any command can be run with the verbose option, which will make LVM output more information about what it is doing. Any command can be run with the test option, which will not make any changes to the system.

Due to LVM's output format, the data property will be an empty object for all non-retrieval commands. An error will be thrown if the command fails (i.e. returns a non-zero exit code).

Example:

import lvm from '@pextra/node-lvm';

const result = await lvm.pv.Create('/dev/loop0', {verbose: true});

/*
	Formed command:
		pvcreate --yes --reportformat json --verbose /dev/loop0

	Result:
	{
		"stdout": "  Wiping signatures on new PV /dev/loop0.\n  Set up physical volume for \"/dev/loop0\" with 20480 available sectors.\n  Zeroing start of device /dev/loop0.\n  Writing physical volume data to disk "\/dev/loop0\".\n  Physical volume \"/dev/loop0\" successfully created.",
		"stderr": "",
		"data": {}
	}
*/

Please see autocompletion in your editor for a full list of available commands and options.

Support/Contact

For enterprise licensing, support, and consulting, please visit our website. Alternatively, you can contact us at [email protected].

If you have any questions, please feel free open an issue or a discussion. You can also contact us at [email protected].

Contributions

We welcome contributions! If you find any bugs, have feature requests, or would like to contribute enhancements, please feel free to open issues or submit pull requests.

We use gts for linting and formatting.

License

node-lvm is licensed under the MIT License.