Rewriting JavaScript: Converting an Array of Objects to an Object
const arrayToObject = (array) => array.reduce((obj, item) => { obj[item.id] = item return obj }, {})const peopleObject = arrayToObject(peopleArray) console.log(peopleObject[idToSelect])
Electron. Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://www.youtube.com/watch?v=8YP_nOCO-4Q
Building cross-platform desktop applications comes with a unique set of challenges that can stand in your way when you are trying to transform your ideas into software. Web apps avoid some of these hurdles, but they have limitations that make them impractical for building native desktop applications. Electron lets you harness the best parts of these technologies to build beautiful, cross-platform desktop applications using HTML, JavaScript, and CSS.
Blockly. A JavaScript library for building visual programming editors.
The Blockly library adds an editor to your app that represents coding concepts as interlocking blocks. It outputs syntactically correct code in the programming language of your choice. Custom blocks may be created to connect to your own application.
Use `const` and make your JavaScript code better
First of all, don’t use var. There are a few differences between var, let and const and the most important one to me is that let and const remove the error-prone behavior with variable hoisting.
A D3 v5 tutorial
This is a short tutorial introducing the basic elements and concepts of D3.
Understanding D3.js Force Layout – 1: The Simplest Possible Graph
This is part of a series of examples that describe the basic operation of the D3.js force layout.
…linkDistance tells the force layout the desired distance between connected nodes. It may seem strange that D3 doesn’t simply compel all links to be that distance. The force layout, however, takes other factors into account as well, which sometimes prevents it from achieving the exact link distance in all cases.
…charge, so named because it’s a property that acts like electrical charge on the nodes. With force-directed graphs in particular, charge causes nodes in the graph to repel each other. This behavior is generally desirable because it tends to prevent the nodes from overlapping each other in the visualization.
Print the whole webpage in a single image file
It only does PNG, but Firefox has a way to capture the whole page built in: Shift-F2 brings up a command prompt, which includes a screenshot command. For instance, screenshot –clipboard –fullpage as I was writing this answer produced http://imgur.com/tnplKPE.
If you want something designed to be automated, phantomjs has page.render() which takes a filename and an optional options object, with format and quality entries; the example given is
page.render('google_home.jpeg', {format: 'jpeg', quality: '100'});
How to update a URL without reloading the page using vanilla JavaScript
The pushState() method let’s you update the URL and create a new item in the browser history without reloading the page. Because the history is updated, this new URL can be changed with the browser’s forward and backward buttons as well.
Here’s how it works.
history.pushState(state, pageTitle, url);
ViviGraphJS. Graph drawing library for JavaScript

VivaGraphJS is designed to be extensible and to support different rendering engines and layout algorithms. Underlying algorithms have been broken out into ngraph.
The larger family of modules can be found by querying npm for «ngraph».
Online JavaScript Beautifier
Beautify, unpack or deobfuscate JavaScript and HTML, make JSON/JSONP readable, etc.
How Dokuwiki loads Javascript and how to add custom JS code
All JavaScript is collected and delivered by lib/exe/js.php. This file will concatenate all found files, whitespace compress (if compress is enabled) and cache the result. It also instructs browsers to cache the file, so when you are developing new JavaScript, be sure to refresh your browser cache (hitting Shift-F5, Shift+CTRL+R or similar) whenever your script was updated.
DokuWiki will load JavaScript from the following places:
autogenerated JavaScript (language strings, config settings, toolbar)
lib/scripts/*.js
lib/plugins/*/script.js
lib/tpl/
conf/userscript.js