mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
feat(route): add dockerhub image new tag (#8965)
* feat: /dockerhub/tags/:owner/:image fix #6916 * fix: update the doc link of /dockerhub/build * docs(en): /dockerhub/tag/:owner/:image * docs: fix typo * fix(dockerhub/tags): use parseDate() * docs: link docs to h2 instead of h3 * chore: move /dockerhub/build to v2 * docs: put warning inside <Route> * fix(dockerhub): use docker.com/hub as the radar path * fix(dockerhub/tag): add :limits? * feat(dockerhub): polish the GUID * fix(dockerhub/tag): stricter argument checks * fix(dockerhub/tag): handle NaN per Deepscan CI
This commit is contained in:
10
lib/v2/dockerhub/utils.js
Normal file
10
lib/v2/dockerhub/utils.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const md5 = require('@/utils/md5');
|
||||
|
||||
function hash(images) {
|
||||
const entries = Object.entries(images)
|
||||
.map((x) => [`${x.os}/${x.architecture}`, x.digest])
|
||||
.sort((a, b) => a[0] - b[0]);
|
||||
return md5(entries.map((x) => x.join(',')).join('|'));
|
||||
}
|
||||
|
||||
module.exports = { hash };
|
||||
Reference in New Issue
Block a user