Skip to content

Commit

Permalink
Consistent function calling conventions in docs (#7)
Browse files Browse the repository at this point in the history
* More descriptive docs for path_or_nil and adding luacheck lints

* Have to run luarocks install separately for each package

* Adding more contributing docs

* Adding link to valid.lua

* Conistent function calling conventions in docs
  • Loading branch information
benwilber authored May 19, 2024
1 parent f53fd7a commit 753e849
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 @@ -287,10 +287,10 @@ assert(not is_valid) -- false, too long

local unique_strings = valid.arrayof(valid.string(), {unique = true})

local is_valid = unique_strings({"a", "b", "c"})
local is_valid = unique_strings {"a", "b", "c"}
assert(is_valid) -- true

local is_valid = unique_strings({"a", "b", "c", "c"})
local is_valid = unique_strings {"a", "b", "c", "c"}
assert(not is_valid) -- false, values are not unique
```

Expand Down Expand Up @@ -359,7 +359,7 @@ local valid_person = valid.map {
}
}

local valid_people_map = valid.mapof({valid.string, valid_person})
local valid_people_map = valid.mapof {valid.string, valid_person}

local people_data = {
alice = {name = "Alice", age = 30},
Expand Down

0 comments on commit 753e849

Please sign in to comment.