Message from JavaScript discussions

December 2020

— There are statically analyzable metrics, like complexity, lines per function, per file, etc.
eslint defines them.
But there are much more metrics.

Message permanent page


Good if they cover only your code🤤 my case is simple, single file, so i track LOCs.. saw some online testers, what you use🤨 eslint

— They cover whatever code has eslint configured 🙄

— Delete doesnt delete objects from memory.
Instead it removes properties from them.

So do I need to use 'delete' after every 'new' like in C++ or not?
(Node JS backend question)

Message permanent page

— No. If the object isn't used anymore, it will be automatically GC'd

— Delete usage is rare

— And it should be

— ..but delete movement is rising, it has a big future🤤 everyone can use delete operator, no more code supremacy! break the chainz!

Message permanent page

— I know one use-case already, it fixes fetch api bug

— I sometimes use it kinda like

const originalConsole = _.cloneDeep(console);
delete console;
console = require('betterconsolemodule');

Message permanent page

— K thx

— Hide it and never show anyone🤤 until the X hour