Skip to content

Commit

Permalink
feat(concat): add Integrity#concat()
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 24, 2017
1 parent 999b421 commit cae12c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class Integrity {
})
}).join(sep)
}
concat (integrity) {
const other = typeof integrity === 'string'
? integrity
: serialize(integrity)
return parse(`${this.toString()} ${other}`)
}
}

module.exports.parse = parse
Expand Down

0 comments on commit cae12c7

Please sign in to comment.