According to this page, the in operator returns true if the specified property is in the specified object or its prototype chain.
The 3-lines code should not to panic,
assert_eq!("t in e", minifier::js::minify("t in e"));
assert_eq!("t+1 in e", minifier::js::minify("t + 1 in e"));
assert_eq!("t-1 in e", minifier::js::minify("t - 1 in e"));
However, it panics after v0.0.27,
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `"t+1 in e"`,
right: `"t+1in e"`'
Also, I think 'make' in car should be minified to 'make' in car but not to 'make'in car, although the latter seems to be acceptable.
According to this page, the
in
operator returns true if the specified property is in the specified object or its prototype chain.The 3-lines code should not to panic,
However, it panics after v0.0.27,
Also, I think
'make' in car
should be minified to'make' in car
but not to'make'in car
, although the latter seems to be acceptable.