Skip to content

fileImportsFrom

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/utils/framework-detect.ts

True when the file has an import … from '<pkgPrefix>…' (or require('<pkgPrefix>…')).

Signature

ts
function fileImportsFrom(filePath: string, pkgPrefix: string, content: string): boolean

Parameters

NameType
filePathstring
pkgPrefixstring
contentstring

Returns: boolean

Was this page helpful?

Download as PDF