jquery-screwed
jquery-screwed copied to clipboard
Bunch of calling to carry info
I 6char-screwed jquery to less than 1MB but I needed to write a prototype and then delete it. Is it allowed?
That sounds quite cool B-) Why shouldn't it be allowed?
https://github.com/837951602/jfuery/blob/master/jfuery.js
Thanks for the link! I really like the idea of a function returning a function to generate long strings. Probably this can be adapted to make it work for generic JS code. I couldn't get jfuery to run in older Android Stock browsers, but I'm sure that can be fixed with some tuning.
Maybe some old environment have too small stack so it doesn't run correctly?
eval('(function(){return arguments.caller})'+Array(1e5).join('()')) VM185:2 Uncaught RangeError: Maximum call stack size exceededmessage: "Maximum call stack size exceeded"stack: (...)get stack: function () { [native code] }arguments: nullcaller: nulllength: 0name: ""prototype: StackTraceGetter__proto__: function Empty() {}
set stack: function () { [native code] }proto: Error
Probably this can be adapted to make it work for generic JS code.
It's from the beginning workable generally. Generator is at https://github.com/837951602/jfuery/blob/master/generator.js, where base.txt is the common part and code.txt stores the code to be turned
With Object.defineProperty setting the function and Array.toString, can reach 4 bits/6 chars. Yet I don't know the compatibility
- () undefined:(),([]),[[]]
- ([]) []
- (![]) false
- (+[]) Num*
- (!![]) true
- (!+[]) false*
- (+![]) 0*
- ([[]])
- [[]] ''*
- [+[]] Num*
- [![]] false
- [!![]] true
- [!+[]] false*
- [+![]]
- [[[]]]