We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 751972a commit 313be66Copy full SHA for 313be66
src/Support/Npm.php
@@ -16,13 +16,16 @@ class Npm
16
public const FIRST_PARTY_PACKAGES = [
17
'laravel-echo',
18
'laravel-precognition',
19
- 'laravel-vite-plugin'
+ 'laravel-vite-plugin',
20
];
21
22
public static function isFirstPartyPackage(string $npmName): bool
23
{
24
- return array_any(self::FIRST_PARTY_SCOPES, fn (string $scope): bool => str_starts_with($npmName, $scope.'/'))
25
- || in_array($npmName, self::FIRST_PARTY_PACKAGES, true);
+ if (collect(self::FIRST_PARTY_SCOPES)->contains(fn (string $scope): bool => str_starts_with($npmName, $scope.'/'))) {
+ return true;
26
+ }
27
+
28
+ return in_array($npmName, self::FIRST_PARTY_PACKAGES, true);
29
}
30
31
/**
0 commit comments