MCPcopy Create free account
hub / github.com/devcontainers/cli / isEarlierVersion

Function isEarlierVersion

src/spec-common/commonUtils.ts:515–524  ·  view source on GitHub ↗
(left: number[], right: number[])

Source from the content-addressed store, hash-verified

513}
514
515export function isEarlierVersion(left: number[], right: number[]) {
516 for (let i = 0, n = Math.max(left.length, right.length); i < n; i++) {
517 const l = left[i] || 0;
518 const r = right[i] || 0;
519 if (l !== r) {
520 return l < r;
521 }
522 }
523 return false; // Equal.
524}
525
526export async function loadNativeModule<T>(moduleName: string): Promise<T | undefined> {
527 // Check NODE_PATH for Electron. Do this first to avoid loading a binary-incompatible version from the local node_modules during development.

Callers 5

fetchFeatureAdvisoriesFunction · 0.90
getDefaultImageNameFunction · 0.90
useNewProjectNameFunction · 0.90
getFeaturesBuildOptionsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected