From my best efforts to understand the code, I think it has misplaced a parenthesis after the } in line 26. Adding the missing parenthesis and fixing the respective closing parentheses at line 163 should reveal that the factory function is defined by the argument to the first IIFE.
Honestly, I question that this code even works. The way the code has been formatted is so strange and obscure. I don't even know if it's a syntax error or just poor formatting.
Yup, agreed. Perhaps you could submit a pull request to format the code. That way, you can help people who are just as curious of the code understand it better. Contributions are always welcome (and needed) in the open-source world.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I understand what are you saying here.
Here is the whole code.
The first IIFE is taking factory as an argument, but where is the factory coming from.
jQuery does the same
From my best efforts to understand the code, I think it has misplaced a parenthesis after the
}
in line 26. Adding the missing parenthesis and fixing the respective closing parentheses at line 163 should reveal that thefactory
function is defined by the argument to the first IIFE.Honestly, I question that this code even works. The way the code has been formatted is so strange and obscure. I don't even know if it's a syntax error or just poor formatting.
The problem is with the way the code is formatted.
the code formatted like above thus there is no error and the code works fine.
The only problem is that this type of formatting creates a lot of confusion (It took me two days, and your help in deciphering it)
this would have been a better approach
Yup, agreed. Perhaps you could submit a pull request to format the code. That way, you can help people who are just as curious of the code understand it better. Contributions are always welcome (and needed) in the open-source world.