jora
Version:
JavaScript object query engine
18 lines (15 loc) • 369 B
JavaScript
;
function compile(node, ctx) {
ctx.node(node.method, node.value);
}
function walk(node, ctx) {
ctx.nodeOrNothing(node.value);
ctx.node(node.method);
}
function stringify(node, ctx) {
ctx.nodeOrNothing(node.value) && ctx.put('.');
ctx.node(node.method);
}
exports.compile = compile;
exports.stringify = stringify;
exports.walk = walk;