JSFiddle - React, Tailwind, and code Playground

by philfreo

HTML

<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script src="https://raw.github.com/documentcloud/backbone/master/backbone.js"></script>

JavaScript

var Model = Backbone.Model.extend({

    parse: function(response) {
        if (response) {
            if (this.has('foo')) {
                response.bar = 'baz';
            }
        }                    
    }
    
});

var model1 = new Model({ x: 1 }, { parse: true });