|
|
|
|
|
by uranian
3282 days ago
|
|
if (__guard__(does.that != null ? does.that.prop : undefined, x => x.exist)) { console.log('yes, no crash!'); }
function __guard__(value, transform) {
return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined;
}
oh my..This was 1 line of CS, how to clean this up without a chance of creating bugs? How on earth is ESxxx an improvement on CS anyways? It's just not true, it's a leap back. |
|