* chore(deps-dev): bump eslint-plugin-unicorn from 60.0.0 to 61.0.1 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 60.0.0 to 61.0.1. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v60.0.0...v61.0.1) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-version: 61.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * refactor: replace `replace(/regex/g)` with replaceAll * refactor: replace sort() with toSorted() for immutability in various routes and utilities * refactor: fix unicorn/prefer-array-find * refactor: fix unicorn/prefer-at * refactor: add unicorn/no-array-sort rule to ESLint configuration --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
12 lines
296 B
TypeScript
12 lines
296 B
TypeScript
import md5 from '@/utils/md5';
|
|
|
|
function hash(images) {
|
|
const entries = Object.entries(images)
|
|
.map((x) => `${x[1].os}/${x[1].architecture},${x[1].digest}`)
|
|
.toSorted((a, b) => a.localeCompare(b));
|
|
const text = entries.join('|');
|
|
return md5(text);
|
|
}
|
|
|
|
export { hash };
|