mirror of
https://github.com/matrix-construct/construct
synced 2024-10-04 22:58:52 +02:00
ircd::js: Add convenience functions to struct args.
This commit is contained in:
parent
ac14c2a4db
commit
96d4bb4775
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,10 @@ namespace js {
|
||||||
struct args
|
struct args
|
||||||
:JS::CallArgs
|
:JS::CallArgs
|
||||||
{
|
{
|
||||||
|
bool empty() const { return length() == 0; }
|
||||||
|
size_t size() const { return length(); }
|
||||||
|
bool has(const size_t &at) const { return size() > at; }
|
||||||
|
|
||||||
value operator[](const size_t &at) const;
|
value operator[](const size_t &at) const;
|
||||||
|
|
||||||
args(const unsigned &argc, JS::Value *const &argv);
|
args(const unsigned &argc, JS::Value *const &argv);
|
||||||
|
|
Loading…
Reference in a new issue