9/28/2023 0 Comments Jslint![]() ![]() ![]() Sure, most PCs have 16 and 32GB of RAM today, so one could ask whether it is an issue, but with the world of IoT in mind which needs such technologies and consists of mostly embedded devices, …. Same functionality can be achieved with maybe 1 or 2MB of RAM usage. But running a little server app to publish one stupid byte with a RAM usage of 130MB is just bullshit. ![]() Nice to see how little code is needed to do something like that. I played around with the OPC-UA stuff a bit. Jslint png images Software craftsmanship JSLint JavaScript Node.js, microphone, text png 1500x884px 19.82KB CommonJS Mocha npm Node.js Webpack, mocha, brown. But the resources a even tiny NodeJS app needs is just some kind of joke and far away from something which could be called “efficient”. I really like the way node makes use of async io. Maybe it doesn’t add too much around the engine, but I think we have different understandings of “small”. Node isn’t that much more than a smallish wrapper This is for sure, but one could port a function(ality) from one to another, without pointing to sense or nonesense. So this tend to be a good starting point for every node.You simply don’t get to run JavaScript on Python. Plus, if you do it like this, it is saying to the jslinter that it handles a node.js program, so if you also (and you should) put in a "use strict" statement, it will not be marked as something that has to be put in a function. Simply put the following JSLint option /*jslint node: true */Īt the top of your files instead, and all magical objects that can be used by node.js will no longer be marked as problems. ![]() An option specification can look like this: /jslint nomen: true, debug: true, evil: false, vars: true /. It is also possible to set those options within the source of a script. Something like: /*global require, module, _dirname */īut there is an easier, and more semantical way to do just that. The implementation of JSLint accepts an option object that allows you to determine the subset of JavaScript that is acceptable to you. To declare those as ok it might be tempting to just add those objects which are defined by node.js to a directive at the top of your node.js program file. Most probably they are all about require is not defined or module is nor defined. Javascript is a highly dynamic language and there is no doubt about having a control mechanism like JSLint that prevents you from writing really stupid code in the first place.īut when writing node.js code, you probably get a lot of false positive problems counted, if you JSLint your code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |