In the course of working with a few scripts, I've noticed many Js
language features I've come to rely on tend to be missing.
For example: Object.(entries|keys|values) and
Array.protype.(find|filter) etc.
The core-js polyfill library does seem to load without any issues into
the platform. How would everyone feel about including it so that it can
be available to everyone closer to in the box?
Where to download the built+minified version https://cdnjs.com/libraries/core-js
The source library.
https://github.com/zloirock/core-js
Note: this is pretty much the core of babel support for legacy browsers, it's been pretty useful in Synchronet as well. It does include some polyfills for ES5 that are already built in, but since some behaviors
change slightly with ES6 it's best to include them all in practice, shouldn't be anything that anyone notices though.
For example, instead of something like...
 var newsgroups = hdr.newsgroups.split(',');
 for(n in newsgroups)
 for(g in msg_area.grp_list)
 for(s in msg_area.grp_list[g].sub_list)
   if (
     msg_area.grp_list[g].sub_list[s].newsgroup.toLowerCase()
     == newsgroups[n].toLowerCase()
 ) {
   ... msg_area.grp_list[g].sub_list[s] ...
 }
You could do...
 var newsgroups = hdr.newsgroups.split(',');
 Object.values(msg_area.sub)
   .filter(function(sub) {
     return newsgroups.includes(sub.newsgroup.toLowerCase());
   })
   .foreach(function(sub) {
      ... sub ...
   });
Of course an updated spidermonkey would allow this to be...
 var newsgroups = hdr.newsgroups.split(',');
 Object.values(msg_area.sub)
   .filter(sub => newsgroups.includes(sub.newsgroup.toLowerCase())
   .foreach(sub => {
      ... sub ...
   });
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,044 |
Nodes: | 16 (1 / 15) |
Uptime: | 45:31:51 |
Calls: | 500,942 |
Calls today: | 5 |
Files: | 109,374 |
D/L today: |
5,262 files (1,003M bytes) |
Messages: | 304,050 |