diff options
author | Felix Fietkau <nbd@nbd.name> | 2025-01-01 16:26:50 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2025-02-04 13:31:53 +0100 |
commit | f0e865fe3dddb4c6681c7f5be25438f1d0f4ae68 (patch) | |
tree | 6d41a6efe93cdc68b61c047e6702a2b75528d39d /lib.c | |
parent | 6dd08716205fb974215521fd03ebcaa96c26b031 (diff) |
ubus: add named parameter support in functions with many params
When a function supports many parameters, the order can be somewhat
confusing, especially when dealing with several optional ones.
In order to make this easier to use, support for passing an object with
named parameters.
for example:
obj.notify("test", data, null, null, null, 1000);
can be written as:
obj.notify({
method: "test",
data,
timeout: 1000
});
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'lib.c')
0 files changed, 0 insertions, 0 deletions