Skip to content

Commit

Permalink
added helper functions to check for v1 and v2 collections
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket Panse committed Aug 17, 2016
1 parent 8d50fd4 commit 01ba9f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ module.exports = {
return converter.convert(collection, options, callback);
},

util: util
util: util,

isv1: function (object) {
return (object.name && object.order && object.requests);
},

isv2: function (object) {
return object && object.info && object.info.schema;
}
};

0 comments on commit 01ba9f8

Please sign in to comment.