Socket
Socket
Sign inDemoInstall

about-this-app

Package Overview
Dependencies
36
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    about-this-app

Utility functions to query package.json


Version published
Weekly downloads
1.1K
decreased by-39.82%
Maintainers
1
Install size
514 kB
Created
Weekly downloads
 

Readme

Source

about-this-app

Greenkeeper badge

Build Status

Utility functions to query a project's package.json file.

const app = require('about-this-app');

Properties

root

The app's root directory (where package.json is located)

pkg

The parsed package.json

dirs

The directories field (or an empty object)

Methods

dir(name)

The resolved path to a named directory. If the name is not found in app.dirs the absolute path to <app.root>/<name> is returned.

hasPkgProp(name)

Returns whether package.json has a property with the given name .

hasDep(name /*, name2, ... */)

Returns whether dependencies contains any of the names.

hasDevDep(name /*, name2, ... */)

Returns whether devDependencies contains any of the names.

hasPeerDep(name /*, name2, ... */)

Returns whether peerDependencies contains any of the names.

hasAnyDep(name /*, name2, ... */)

Returns whether any of the names is listed as any kind of dependency.

hasScript(name /*, name2, ... */)

Returns whether scripts contains any of the names.

hasFile(name)

Returns whether a file with the given name exists relative to app.root.

License

MIT

FAQs

Last updated on 19 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc