Skip to content

Commit

Permalink
feat(api): added serialize alias for unparse
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 23, 2017
1 parent 2e0a8a6 commit 999b421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ function parse (integrity) {
}, new Integrity())
}

module.exports.unparse = unparse
function unparse (obj, sep) {
module.exports.serialize = serialize
module.exports.unparse = serialize
function serialize (obj, sep) {
if (obj.algorithm && obj.digest) {
return IntegrityMetadata.prototype.toString.call(obj)
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ssri",
"version": "1.0.0",
"description": "Simple Subresource Integrity library -- generates, parses, and unparses integrity strings.",
"description": "Simple Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
"main": "index.js",
"files": [
"*.js",
Expand Down

0 comments on commit 999b421

Please sign in to comment.