examples/todomvc/js/models/model.js
function (title, callback) {
        title = title || '';
        callback = callback || function () { };

        var newItem = {
          title: title.trim(),
          completed: false
        };

        storage.save(newItem, callback);
      }
function (title, callback) {
        title = title || '';
        callback = callback || function () { };

        var newItem = {
          title: title.trim(),
          completed: false
        };

        storage.save(newItem, callback);
      }
function ( title , callback ) { title = title || '' ; callback = callback || function ( ) { } ; var newItem = { title : title . trim ( ) , completed : false } ; storage . save ( newItem , callback ) ; }
Creates a new todo model

@param {string} [title] The title of the task
@param {function} [callback] The callback to fire after the model is created
Creates a new todo model