MCPcopy Create free account
hub / github.com/ember-learn/ember-api-docs / toIntArray

Function toIntArray

app/helpers/version-lt.js:4–7  ·  view source on GitHub ↗

Converts a compact version string like '2.16' into an int array [2, 16]

(versionStr)

Source from the content-addressed store, hash-verified

2
3/** Converts a compact version string like '2.16' into an int array [2, 16] */
4function toIntArray(versionStr) {
5 let versionStrArray = versionStr.split('.');
6 return versionStrArray.map((item) => parseInt(item));
7}
8
9function major(versionArray) {
10 return versionArray[0];

Callers 1

versionLtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected