Skip to content

Commit cae12c7

Browse files
committed
feat(concat): add Integrity#concat()
1 parent 999b421 commit cae12c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class Integrity {
3535
})
3636
}).join(sep)
3737
}
38+
concat (integrity) {
39+
const other = typeof integrity === 'string'
40+
? integrity
41+
: serialize(integrity)
42+
return parse(`${this.toString()} ${other}`)
43+
}
3844
}
3945

4046
module.exports.parse = parse

0 commit comments

Comments
 (0)