Sha256: fc07276ae0b29b0757dab5846f1da623b2916f5308db47e265c05bc5af97ebd7
Contents?: true
Size: 360 Bytes
Versions: 24
Compression:
Stored size: 360 Bytes
Contents
const _ = require('lodash'); module.exports = function createFlatOrder(order) { const flatOrder = []; appendGroup(order); function appendGroup(items) { items.forEach(item => appendItem(item)); } function appendItem(item) { if (_.isString(item)) { flatOrder.push(item); return; } appendGroup(item.properties); } return flatOrder; };
Version data entries
24 entries across 24 versions & 1 rubygems