Guy Kogus
Guy Kogus
You need to encapsulate your `claims` using the `ClaimSet` struct. ``` return JWT.encode(claims: ClaimSet(claims: [...], algorithm: .hs256("SOME SECRET STRING".data(using: .utf8)!) ```
@cyber-gh I have something like that in my apps but it's usually very business-case-specific. It's the kind of thing that might be better served as a separate project rather than...
Actually the code example is `dayInYear`. To get `numberOfDaysLeftInYear` it would be calculated as such: ```Swift extension Date { var dayInYear: Int { return Calendar.current.ordinality(of: .day, in: .year, for: self)!...
If we change the current API to return `Any?`, which would involve no casting, it'd be a breaking change, unfortunately. The current return type is completely wrong anyway, considering that...
2. I'm not sure why the functions have `@discardableResult`. If you discard the result then it's completely useless. 3. I also think that the naming should be consistent, e.g. ```Swift...
Re: `colored`, the issue itself is not trivial and it's great that you're raising it and trying to deal with it. However, applying a broad stroke can be a sign...
Now your suggestion makes a lot of sense. I likes it! I wonder if it's possible to make `NSAttributedString` conform to `ExpressibleByStringLiteral` to make this kind of magic happen automatically...
> Now your suggestion makes a lot of sense. I likes it! I wonder if it's possible to make `NSAttributedString` conform to `ExpressibleByStringLiteral` to make this kind of magic happen...
@gurgeous yes please! :D
1. I assume it'll be fine to make it optional. You probably won't have to do any `if`-`else`s or anything, so go for it. 2. Unfortunately there are breakages of...