Member predicate FilePath::getPackagePrefix
Gets the NPM package name from the beginning of the given import path.
Has no result for paths starting with a .
or /
For example:
foo/bar
maps tofoo
@example/foo/bar
maps to@example/foo
./foo
maps to nothing.