Skip to content

Formatting should follow Crockford's JavaScript formatting conventions #21

Open
@typerandom

Description

@typerandom

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));
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions