summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.js b/index.js
index bcc6927..f467018 100644
--- a/index.js
+++ b/index.js
@@ -36,6 +36,11 @@ function fromObject(root) {
return f(map);
});
};
+ root.findLinkByRel = function(rel) {
+ return _.find(this.collection.links, function(link) {
+ return rel === link.rel;
+ });
+ }
return root;
}