Remove newlines for createFn#205
Conversation
Nice option to remove newlines from functions during createFn to make it easier maintaining the functions.
1 similar comment
|
why did you remove newline from functions? In this way functions will not be really readable from Studio. |
|
Sending a javascript function through createFn currently throws an error when it contains newlines. Be nice to have at least the option to have them removed instead of reproducing the same logic with parse-function in the application code. or is this an orientDB issue itself not accepting the newlines in the functions? |
|
@marcfisher |
|
Sure. All I am doing in the code is importing a file which has a map of keys to functions. I iterate over it and call db.createFn(key, map[key]) basically for each. They all fail, I've added an example function below as well as the stack trace which I think is the meaningful part. With that newline removed adding into orientjs there is no issue, without it add any function with multiple lines always fails. function(_Vertex, _Content) { Stack Trace: BTW are you primary maintainer of OrientJS currently? |
Nice option to remove newlines from functions during createFn to make
it easier maintaining the functions.