lib/parse.js
function (daString) {
      // stop shouting
      daString = daString.replace(/^([A-Z]*)$/, function (match, c) {
        return (c ? c.toLowerCase() : '')
      })
      // prepare camels for _
      daString = daString.replace(/([A-Z])/g, function (match, c) {
        return (c ? '_' + c : '')
      })
      // convert to " "
      daString = daString.replace(/(\-|_|\s)+(.)?/g, function (match, sep, c) {
        return (c ? (sep ? ' ' : '') + c.toUpperCase() : '')
      })
      // capitalize
      daString = daString.replace(/(.)/, function (match, c) {
        return (c ? c.toUpperCase() : '')
      })
      // clean up
      return daString.trim()
    }
function (daString) {
      // stop shouting
      daString = daString.replace(/^([A-Z]*)$/, function (match, c) {
        return (c ? c.toLowerCase() : '')
      })
      // prepare camels for _
      daString = daString.replace(/([A-Z])/g, function (match, c) {
        return (c ? '_' + c : '')
      })
      // convert to " "
      daString = daString.replace(/(\-|_|\s)+(.)?/g, function (match, sep, c) {
        return (c ? (sep ? ' ' : '') + c.toUpperCase() : '')
      })
      // capitalize
      daString = daString.replace(/(.)/, function (match, c) {
        return (c ? c.toUpperCase() : '')
      })
      // clean up
      return daString.trim()
    }
function ( daString ) { // stop shouting daString = daString . replace ( / ^([A-Z]*)$ / , function ( match , c ) { return ( c ? c . toLowerCase ( ) : '' ) } ) // prepare camels for _ daString = daString . replace ( / ([A-Z]) / g , function ( match , c ) { return ( c ? '_' + c : '' ) } ) // convert to " " daString = daString . replace ( / (\-|_|\s)+(.)? / g , function ( match , sep , c ) { return ( c ? ( sep ? ' ' : '' ) + c . toUpperCase ( ) : '' ) } ) // capitalize daString = daString . replace ( / (.) / , function ( match , c ) { return ( c ? c . toUpperCase ( ) : '' ) } ) // clean up return daString . trim ( ) }
Generate a UI model based on a SciSpike generated state matrix.
Generate a UI model based on a SciSpike generated state matrix .