Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 8, 2024
1 parent a65999e commit 9320cf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/check_comment.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ try
url: "https://www.yourblog.com"

result = await new Client("123YourAPIKey", blog).checkComment comment
console.log(if result is CheckResult.ham then "The comment is ham." else "The comment is spam.")
console.log if result is CheckResult.ham then "The comment is ham." else "The comment is spam."

catch error
console.error if error instanceof Error then error.message else error
2 changes: 1 addition & 1 deletion example/verify_key.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ try
client = new Client "123YourAPIKey", blog

isValid = await client.verifyKey()
console.log(if isValid then "The API key is valid." else "The API key is invalid.")
console.log if isValid then "The API key is valid." else "The API key is invalid."

catch error
console.error if error instanceof Error then error.message else error
2 changes: 1 addition & 1 deletion src/client.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Client
@apiKey = apiKey

# The base URL of the remote API endpoint.
@baseUrl = new URL(if url.endsWith("/") then url else "#{url}/")
@baseUrl = new URL if url.endsWith("/") then url else "#{url}/"

# The front page or home URL of the instance making requests.
@blog = blog
Expand Down

0 comments on commit 9320cf3

Please sign in to comment.