-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove newlines for createFn #205
base: master
Are you sure you want to change the base?
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.