wIoT - A distributed IoT operating system basing on NodeJS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
296 B

module.exports = wiot => {
wiot.newPrimitive('sjson_encode', (node, wire_output, wire_input) => ({
node: node,
input: wire_input,
output: wire_output
}), (o, method) => {
let node = o.node;
node.trigger(o.input, `tmp,${o.output[0].reg}=pcall(sjson.encode,${o.input[0].reg});`);
});
}