The lodash method _.flattenDeep
exported as a Node.js module.
Using npm:
$ {sudo -H} npm i -g npm
$ npm i --save lodash.flattendeep
In Node.js:
var flattenDeep = require('lodash.flattendeep');
See the documentation or package source for more details.