Function
havePackageGroupsCorrectShape
(
pkgGroups: ReadonlyArray<PackageGroup>
)
Source from the content-addressed store, hash-verified
| 69 | } |
| 70 | |
| 71 | const havePackageGroupsCorrectShape = ( |
| 72 | pkgGroups: ReadonlyArray<PackageGroup> |
| 73 | ) => { |
| 74 | return ( |
| 75 | isArray(pkgGroups) && |
| 76 | pkgGroups.every( |
| 77 | (arr) => |
| 78 | isArray(arr) && arr.every((pkgName) => typeof pkgName === "string") |
| 79 | ) |
| 80 | ); |
| 81 | }; |
| 82 | |
| 83 | // TODO: it might be possible to remove this if improvements to `Array.isArray` ever land |
| 84 | // related thread: github.com/microsoft/TypeScript/issues/36554 |
Tested by
no test coverage detected