Revision b75a5717
Added by koszko over 1 year ago
common/entities.js | ||
---|---|---|
100 | 100 |
} |
101 | 101 |
#EXPORT get_newest_version AS get_newest |
102 | 102 |
|
103 |
/* |
|
104 |
* Returns true if the argument is a nonempty array of numbers without trailing |
|
105 |
* zeros. |
|
106 |
*/ |
|
107 |
function is_valid_version(version) { |
|
108 |
return Array.isArray(version) && version.length > 0 && |
|
109 |
version.every(n => typeof n === "number") && |
|
110 |
version[version.length - 1] !== 0; |
|
111 |
} |
|
112 |
#EXPORT is_valid_version |
|
113 |
|
|
103 | 114 |
/* |
104 | 115 |
* item is a definition of a resource or mapping. Yield all file references |
105 | 116 |
* (objects with `file` and `sha256` properties) this definition has. |
Also available in: Unified diff
add a repo querying HTML interface