-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Most of JS code is overengineering and bad JS style.
Examples are
Map.prototype._escapeKey = function (key) {
return '$' + key;
};
just write
function escape(key) {
return '$' + key;
};
Never make _stuff to make private node.js module funcations
The other example
Map.prototype.get = function (key) {
return this.has(key) ? this._values[this._escapeKey(key)] : undefined;
};
The same is:
Map.prototype.get = function (key) {
return this._values[escapeKey(key)];
};
JS is a beatiful language when used properly, please don't write shit code.
I think your JS/node knowledge is poor
Metadata
Metadata
Assignees
Labels
No labels