Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 30, 2024 via pnpm

pkginfo 0.2.3

An easy way to expose properties on a module from a package.json
Package summary
Share
1
issue
1
critical severity
license
1
1
license
1
N/A
Package created
4 Jun 2011
Version published
8 Dec 2011
Maintainers
1
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

1

1 critical severity issue

critical
Recommendation: Check the package code and files for license information
via: pkginfo@0.2.3
Collapse
Expand

Licenses

N/A

N/A
1 Packages, Including:
pkginfo@0.2.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of pkginfo 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does pkginfo do?

Pkginfo is a highly efficient tool for Node.js, allowing developers to programmatically expose properties within a module from a package.json file. Avoiding the usual need to hard code the version string into your code or to create manual exposure, pkginfo provides an automated solution. This npm package simplifies the process of accessing and sharing vital information contained in a package.json file to your specific module with ease.

How do you use pkginfo?

Using pkginfo is straightforward and requires a simple JavaScript call. Firstly, remember to install pkginfo using npm with the command npm install pkginfo. Following this, you can implement this package into your code in a very direct way. Below is an example of usage:

var pkginfo = require('pkginfo')(module);

console.dir(module.exports);

By invoking the pkginfo module, all properties in your package.json file will be automatically exposed on the parent module of pkginfo. If you prefer to expose only certain properties, you can do so by specifying them in the pkginfo function call like so:

var pkginfo = require('pkginfo')(module, 'version', 'author');

console.dir(module.exports);

In this instance, only 'version' and 'author' properties will be exposed.

Where are the pkginfo docs?

An extensive guide for using pkginfo, complete with code examples, is available directly from the pkginfo GitHub repository. The repository, indexed under the username indexzero, can be found at github.com/indexzero/node-pkginfo. The repository includes detailed usage instructions, as well as more complex usage examples in the examples directory.