Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

about-this-app

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

about-this-app

Utility functions to query package.json

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 19 Aug 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc