Open tianyagongcishi opened 10 years ago
Using equery:
grasp -e 'sayHello("from", { _:$ps, message: $msg})' -R 'sayHello("from", {\n {{ps | join ",\n " }},\n info: {{msg}}\n})'
results in
sayHello("from", {
title: "abc",
info: "aha"
});
not the cleanest way as you can see though perhaps we should:
oh,it's so complex,i have use RegExp instead. tks anyway
Yes, it's definitely a use case that needs to be simplified
i have a method call like below: sayHello("from", { title: "abc", message: "aha" });
how to change the second argument's property name "message" to "info"(only when the method's name is "sayHello" and the first argument is "from")? by the way, i use grasp in nodejs and squery thank you very much!