0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-03 09:18:19 +02:00

ircd::js: Add convenience functions to struct args.

This commit is contained in:
Jason Volk 2016-10-27 23:32:51 -07:00
parent ac14c2a4db
commit 96d4bb4775

View file

@ -28,6 +28,10 @@ namespace js {
struct args
: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;
args(const unsigned &argc, JS::Value *const &argv);