3 ms·
Ohhh, I was confused because I know Node caches module objects, but I see the code in the V1 case is creating a new function each time it's used. Seems like it'
by stupidcar 12y ago
Ohhh, I was confused because I know Node caches module objects, but I see the code in the V1 case is creating a new function each time it's used. Seems like it's not really a module issue per se though, just a general JS best practice.
- sorenso 12y agoYes, version 1 is using closures which creates a new function every time the function is called. I've seen this pattern in many places and even used it myself :) -sorenso-