openresty / openresty/luajit2

not correct of the isarray function example

Open
#93 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.4k
Forks
252
Avg merge
7d 11h
Merged PRs (30d)
3

Description

current isarray function example is

local isarray = require "table.isarray"

print(isarray{"a", true, 3.14})  -- true
print(isarray{"dog" = 3})  -- false
print(isarray{})  -- true

That is not the correct lua syntax. It should be

local isarray = require "table.isarray"

print(isarray({"a", true, 3.14}))  -- true
print(isarray({dog = 3}))  -- false
print(isarray({}))  -- true

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the documentation containing the table.isarray example and compare it with the Lua syntax shown in the issue. Update the example so all three calls use valid table expressions, then verify that the displayed snippets are syntactically correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.