Nodejs Object Flatten flatten()

Here you can find the source of flatten()

Method Source Code

Object.prototype.flatten = function() {
  var that = this;
  return Object.getOwnPropertyNames(this).map(function(name) {
    return that[name];
  });/*from   w ww.  j  a  v a  2s  .  co  m*/
};