Francesco Trotta

Results 443 comments of Francesco Trotta

Thanks for reporting this. The reason why JScrewIt does not parse octal escape sequences is that they are illegal in strict mode. For example, ES6 modules are always strict mode...

There should be a feature "LEGACY_OCT". A combined feature "NON_STRICT" wouldn't be particularly useful because both "INCR_CHAR" and "LEGACY_OCT" would be already available in all engines. The point is that...

I believe something like `Array(4).join(";")` should be almost always the best choice with repeated substrings (where `Array` is `[].constructor`).

Well there is also `";".repeat(3)`, although it doesn't work in older engines.

This is still longer than `[].constructor(4).join("!")`. But I appreciate the idea.

Seems legit. This can be probably integrated in [`createCharCodesEncoding`](https://github.com/fasttime/JScrewIt/blob/e7fc98c48b71079ceb409668c932e29b37d56cbb/src/lib/encoder-ext.js#L395-L403) somehow.

Apparently, `return String`... is cheaper for `["CAPITAL_HTML", "ENTRIES_OBJ"]`: https://jsfiddle.net/wrspc5g5/ Granted, that's a feature combination not found anywhere, but still.

That's because in IE, `"".sub() + ""` produces `` rather than ``, but I can't think of how to make `(isNaN+false).constructor` shorter, so there are no more winners by now....

That's no surprise since I wrote nearly all of the code myself, and sometimes I must use a debugger to understand what I did. But if you have any questions...

Sometimes it's better to use legacy octal escape sequences, e.g. `\\41` instead of `\\u0021`. These should be fine also in strict mode code since they are parsed by the `Function`...