Open martoio opened 4 years ago
Also, if you have more than 2 or 3 arguments for a function, then you should use an object or some kind of data type to represent those arguments. There's no chance you can remember the order every time and it saves you the pain of having to deal with long parameter lists.
Capitalize your data structure classes: https://github.com/webwizard99/salt-store-backend/blob/dc880294543b5bbce10963657e84ac953de71e56/utilities/storeitems.js#L4
It makes it clear later on when you do
new Item()
that Item is some custom Data Type that you've defined.Also, try to use ES6 classes!