Go to repository

Class PackageJsonReader

A package json reader creates a wrapper around the action of reading a JSON file and accessing the properties of it in an easy fashion. If reading the file fails, the returned reader will always return undefined for any property intended to be read.

Constructors

Properties

Methods

Constructors

Create a new PackageJsonReader.

Parameters

  • packageJsonLocation: string

    The location of the file to read.

Returns PackageJsonReader

Properties

_contents: unknown

The contents of the package.json read file.

Methods

Return the associated value for a given key.

Parameters

  • key: string

Returns unknown