forked from jashkenas/underscore
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make _.initWrapper() that builds the wrapper prototye
The intention is that underscore Consumers MUST call _.initWrapper() in their code to allow the OO style usage, or a runtime error is thrown. This would break backwards compatability, so for the moment I call initWrapper myself at the end of underscore. However, if I comment out my call to initWrapper and don't call it in user code, then the compiler can strip an empty underscore with no user code from 2137 -> 100 bytes. Making the user explicitly say they want OO wrapping is the only way to achieve this, otherwise the compiler will always keep the OO wrapper code around.
- Loading branch information
Showing
1 changed file
with
56 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters