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

Function stringifySemverNumber

scripts/website.js:253–258  ·  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

251 * @returns
252 */
253function stringifySemverNumber(arr, dotX) {
254 if (dotX) {
255 return `${arr[0]}.x`;
256 }
257 return `${arr[0]}.${arr[1]}.${arr[2]}`;
258}
259
260/**
261 * 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