Open
Description
Formatting should follow Crockford's JavaScript formatting conventions. This to increase readability and ease (most JS projects follow this style) when contributing to the project. Also, we should also add a .jslint
-file so that these conventions are enforced.
E.g.
Jwt.prototype.isExpired = function() {
return new Date(this.body.exp*1000) < new Date();
};
Should be formatted as:
Jwt.prototype.isExpired = function () {
return new Date(this.body.exp * 1000) < new Date();
};
And:
if(header instanceof Error){
return done(new JwtParseError(properties.errors.PARSE_ERROR,jwtString,null,null,header));
}
Should be formatted as:
if (header instanceof Error) {
return done(new JwtParseError(properties.errors.PARSE_ERROR, jwtString, null, null, header));
}