lib/models/package-info-cache/node-modules-list.js:7
NodeModulesList
Class that stores information about a node_modules directory (i.e., the packages and subdirectories in the directory). It is one of the two types of entries in a PackageInfoCache. It is only created by the PackageInfoCache.
Method Summary
Public Methods | |
---|---|
public |
findPackage(packageName):
Return a PackageInfo object for a given package name (which may include a scope) |
public |
hasErrors( )
Indicate if there are any errors in the NodeModulesList itself (not including errors within the individual entries). |
Protected Methods | |
---|---|
protected |
addEntry(entryName, entryVal)
Add an entry (PackageInfo or NodeModulesList instance) to the entries for this list. This is only called by PackageInfoCache. It is not intended to be called directly by anything else. |
protected |
addError(errorType, errorData)
Given error data, add an ErrorEntry to the ErrorList for this object. |
Public Methods
lib/models/package-info-cache/node-modules-list.js:84
public findPackage(packageName):
Return a PackageInfo object for a given package name (which may include a scope)
Parameters:
Name | Type | Attribute | Description |
---|---|---|---|
packageName | String |
|
the name (possibly including a scope) of the PackageInfo the caller wants returned. |
Return:
the desired PackageInfo if one exists for the given name, else null.
lib/models/package-info-cache/node-modules-list.js:56
public hasErrors( )
Indicate if there are any errors in the NodeModulesList itself (not including errors within the individual entries).
Protected Methods
lib/models/package-info-cache/node-modules-list.js:67
protected addEntry(entryName, entryVal)
Add an entry (PackageInfo or NodeModulesList instance) to the entries for this list. This is only called by PackageInfoCache. It is not intended to be called directly by anything else.
lib/models/package-info-cache/node-modules-list.js:43
protected addError(errorType, errorData)
Given error data, add an ErrorEntry to the ErrorList for this object.