var assert = require('assert'); var crypto = require('crypto'); // [[a, [b, c]], d] -> [a, b, c, d] function flatten(array) { var result = []; for (var i=0; i