src/generator.js
function getPropertyOrder (properties) {
  const primitiveProps = []
  const complexProps = []

  _.forIn(properties, (prop, propName) => {
    if (prop.type === 'object' || prop.type === 'array') {
      complexProps.push(propName)
    } else {
      primitiveProps.push(propName)
    }
  })

  return primitiveProps.concat(complexProps)
}
function getPropertyOrder (properties) {
  const primitiveProps = []
  const complexProps = []

  _.forIn(properties, (prop, propName) => {
    if (prop.type === 'object' || prop.type === 'array') {
      complexProps.push(propName)
    } else {
      primitiveProps.push(propName)
    }
  })

  return primitiveProps.concat(complexProps)
}
function getPropertyOrder ( properties ) { const primitiveProps = [ ] const complexProps = [ ] _ . forIn ( properties , ( prop , propName ) => { if ( prop . type === 'object' || prop . type === 'array' ) { complexProps . push ( propName ) } else { primitiveProps . push ( propName ) } } ) return primitiveProps . concat ( complexProps ) }
Take the properties of an object and put primitive types above non-primitive types
@param {BunsenModelSet} properties - the properties for the model (key-value)
@returns {String[]} an array of property names in the order we should display them
Take the properties of an object and put primitive types above non - primitive types