function makeDataBindAttribs(attribs) {
            if (attribs) {
                var fields = Object.keys(attribs).map(function (key) {
                    var value = attribs[key];
                    if (typeof value === 'string') {
                        //var escapedValue = value.replace(/\"/g, '\\"');
                        return key + ':' + value;
                    }
                    if (typeof value === 'object') {
                        return key + ': {' + makeDataBindAttribs(value) + '}';
                    }
                    // just ignore invalid attributes for now
                    // TODO: what is the proper thing to do?
                    return '';
                });
                return fields.filter(function (field) {
                    return field ? true : false;
                }).join(',');
            }
            return '';
        }
/**
         * The attributes for knockout's data-bind is slightly different than
         * for style. The syntax is that of a simple javascript object.
         * property: value, property: "value", property: 123
         * So, we simply escape double-quotes on the value, so that unquoted values
         * will remain as raw names/symbols/numbers, and quoted strings will retain
         * the quotes.
         * TODO: it would be smarter to detect if it was a quoted string
         * 
         * @param {type} attribs
         * @returns {String}
         */
The attributes for knockout's data-bind is slightly different than
for style. The syntax is that of a simple javascript object.
property: value, property: "value", property: 123
So, we simply escape double-quotes on the value, so that unquoted values
will remain as raw names/symbols/numbers, and quoted strings will retain
the quotes.
TODO: it would be smarter to detect if it was a quoted string

@param {type} attribs
@returns {String}
The attributes for knockout ' s data - bind is slightly different than for style . The syntax is that of a simple javascript object . property : value property : " value " property : 123 So we simply escape double - quotes on the value so that unquoted values will remain as raw names / symbols / numbers and quoted strings will retain the quotes . TODO : it would be smarter to detect if it was a quoted string @param { type } attribs @returns { String }
function makeDataBindAttribs(attribs) {
            if (attribs) {
                var fields = Object.keys(attribs).map(function (key) {
                    var value = attribs[key];
                    if (typeof value === 'string') {
                        return key + ':' + value;
                    }
                    if (typeof value === 'object') {
                        return key + ': {' + makeDataBindAttribs(value) + '}';
                    }
                    return '';
                });
                return fields.filter(function (field) {
                    return field ? true : false;
                }).join(',');
            }
            return '';
        }
function makeDataBindAttribs ( attribs ) { if ( attribs ) { var fields = Object . keys ( attribs ) . map ( function ( key ) { var value = attribs [ key ] ; if ( typeof value === 'string' ) { return key + ':' + value ; } if ( typeof value === 'object' ) { return key + ': {' + makeDataBindAttribs ( value ) + '}' ; } return '' ; } ) ; return fields . filter ( function ( field ) { return field ? true : false ; } ) . join ( ',' ) ; } return '' ; }
The attributes for knockout's data-bind is slightly different than
 for style.
The attributes for knockout ' s data - bind is slightly different than for style .
//var escapedValue = value.replace(/\"/g, '\\"'); // just ignore invalid attributes for now // TODO: what is the proper thing to do?