lib/transform.js
function(line) {
        var newLine;

        // ex: [foo <- 1,2,3]
        // [        opening array
        //   (.*)   $1 array to concat into
        //   (<-)   $2
        //   (.*)   $3 content to be merged
        // ]        closing array
        var regexArr = /\[(.*)(\<\-)(.*)\]/;

        // ex: {foo <- foo: true, bar: 2}
        // {        opening object
        //   (.*)   $1 obj to merge into
        //   (<-)   $2
        //   (.*)   $3 content to be merged
        // }        closing object
        var regexObj = /\{(.*)(\<\-)(.*)\}/;

        newLine = line.replace(regexArr, function($0, $1, $2, $3) {
            return $1.trim() + '.concat([' + $3 + ']);';
        });

        return newLine.replace(regexObj, function($0, $1, $2, $3) {
            return $1.trim() + '.merge({' + $3 + '});';
        });
    }
function(line) {
        var newLine;

        // ex: [foo <- 1,2,3]
        // [        opening array
        //   (.*)   $1 array to concat into
        //   (<-)   $2
        //   (.*)   $3 content to be merged
        // ]        closing array
        var regexArr = /\[(.*)(\<\-)(.*)\]/;

        // ex: {foo <- foo: true, bar: 2}
        // {        opening object
        //   (.*)   $1 obj to merge into
        //   (<-)   $2
        //   (.*)   $3 content to be merged
        // }        closing object
        var regexObj = /\{(.*)(\<\-)(.*)\}/;

        newLine = line.replace(regexArr, function($0, $1, $2, $3) {
            return $1.trim() + '.concat([' + $3 + ']);';
        });

        return newLine.replace(regexObj, function($0, $1, $2, $3) {
            return $1.trim() + '.merge({' + $3 + '});';
        });
    }
function ( line ) { var newLine ; // ex: [foo <- 1,2,3] // [        opening array //   (.*)   $1 array to concat into //   (<-)   $2 //   (.*)   $3 content to be merged // ]        closing array var regexArr = / \[(.*)(\<\-)(.*)\] / ; // ex: {foo <- foo: true, bar: 2} // {        opening object //   (.*)   $1 obj to merge into //   (<-)   $2 //   (.*)   $3 content to be merged // }        closing object var regexObj = / \{(.*)(\<\-)(.*)\} / ; newLine = line . replace ( regexArr , function ( $0 , $1 , $2 , $3 ) { return $1 . trim ( ) + '.concat([' + $3 + ']);' ; } ) ; return newLine . replace ( regexObj , function ( $0 , $1 , $2 , $3 ) { return $1 . trim ( ) + '.merge({' + $3 + '});' ; } ) ; }
merges immutable objects or arrays together returns String a -> String b
merges immutable objects or arrays together returns String a - > String b