Skip to content

Commit 313be66

Browse files
committed
Update Npm.php
1 parent 751972a commit 313be66

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Support/Npm.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ class Npm
1616
public const FIRST_PARTY_PACKAGES = [
1717
'laravel-echo',
1818
'laravel-precognition',
19-
'laravel-vite-plugin'
19+
'laravel-vite-plugin',
2020
];
2121

2222
public static function isFirstPartyPackage(string $npmName): bool
2323
{
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);
24+
if (collect(self::FIRST_PARTY_SCOPES)->contains(fn (string $scope): bool => str_starts_with($npmName, $scope.'/'))) {
25+
return true;
26+
}
27+
28+
return in_array($npmName, self::FIRST_PARTY_PACKAGES, true);
2629
}
2730

2831
/**

0 commit comments

Comments
 (0)