Call it via:
const flat = flatten( realDeepObject );
Test case:
/*************************************************************************************************************************************************************** | |
* | |
* Application framework and settings | |
* | |
* [Description of application] | |
* | |
* @license [url] [description] | |
* @author [author] [@email] | |
* @repository [url] | |
* |
This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.
After creating the server (droplet on DigitalOcean) log in with
See below code for React, Vanilla JavaScript and jQuery.
/*************************************************************************************************************************************************************** | |
* | |
* App framework and settings | |
* | |
* [Description of application] | |
* | |
* @license [url] [description] | |
* @author [author & @email] | |
* @repository [url] | |
* |
export PATH=/usr/local/bin:$PATH | |
# promt colors | |
export PS1="\[\033[0;32m\]\w \[\033[0;97m\]\$\[\033[0m\] " | |
# ls alias for color-mode | |
alias ls='ls -lhaG' | |
# cd up | |
alias ..='cd ..' |