MCPcopy Create free account
hub / github.com/Automattic/mongoose / stringifySemverNumber

Function stringifySemverNumber

scripts/website.js:258–263  ·  view source on GitHub ↗

* Stringify a semver number array * @param {number[]} arr The array to stringify * @param {boolean} dotX If "true", return "5.X" instead of "5.5.5" * @returns

(arr, dotX)

Source from the content-addressed store, hash-verified

256 * @returns
257 */
258function stringifySemverNumber(arr, dotX) {
259 if (dotX) {
260 return `${arr[0]}.x`;
261 }
262 return `${arr[0]}.${arr[1]}.${arr[2]}`;
263}
264
265/**
266 * Get the latest version available

Callers 3

getLatestVersionFunction · 0.85
getLatestVersionOfFunction · 0.85
getCurrentVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected