Skip to content

Commit

Permalink
Merge pull request #324 from kitwtnb/fix-readme
Browse files Browse the repository at this point in the history
fix readme
  • Loading branch information
3lvis authored May 26, 2024
2 parents f44a8f6 + 4740e2e commit 41525b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ let score = try? storage.object(forKey: "score")
let favoriteCharacter = try? storage.object(forKey: "my favorite city")

// Check if an object exists
let hasFavoriteCharacter = try? storage.existsObject(forKey: "my favorite city")
let hasFavoriteCharacter = try? storage.objectExists(forKey: "my favorite city")

// Remove an object in storage
try? storage.removeObject(forKey: "my favorite city")
Expand Down Expand Up @@ -263,7 +263,7 @@ storage.async.object(forKey: "my favorite city") { result in
}
}

storage.async.existsObject(forKey: "my favorite city") { result in
storage.async.objectExists(forKey: "my favorite city") { result in
if case .success(let exists) = result, exists {
print("I have a favorite city")
}
Expand Down Expand Up @@ -299,7 +299,7 @@ try? storage.setObject("This is a string", forKey: "string")
// A given expiry date will be applied to the item
try? storage.setObject(
"This is a string",
forKey: "string"
forKey: "string",
expiry: .date(Date().addingTimeInterval(2 * 3600))
)

Expand Down

0 comments on commit 41525b4

Please sign in to comment.