This package exposes a single listExports
function that can be used to list a package's exports.
The function expects one or two parameters:
export function listExports(
location: string,
input?: ExportInput,
): Promise<Array<Export>>;
location
is the path to the pacakgeJson fileinput
can be provided, with multiple options:packageJson
(unknown
), thepackage.json
object. If a value is passed, it won't be read fromlocation
.environment
(node
|browser
| null, default:node
) Environment condition to use in resolvingtype
(import
|require
|default
| null, default:import
when the package is imported andrequire
when the package is required) Module type condition to load. Thedefault
condition is added unless the valuenull
is passed.extraCondition
(string[]
, default:[]
) Extra conditions to allow
This package is licensed under the MIT license, which can be found in LICENSE.md
.
Dependencies are bundled while publishing, check NOTICE.md
in the published package for their licenses.