backbone.statemachine.js
function(name, data) {
        if (name === ANY_STATE)
          throw new Error('state name "' + ANY_STATE + '" is forbidden')

        data = _.clone(data)
        data.enter = this._collectMethods((data.enter || []))
        data.leave = this._collectMethods((data.leave || []))
        this._states[name] = data
      }
function(name, data) {
        if (name === ANY_STATE)
          throw new Error('state name "' + ANY_STATE + '" is forbidden')

        data = _.clone(data)
        data.enter = this._collectMethods((data.enter || []))
        data.leave = this._collectMethods((data.leave || []))
        this._states[name] = data
      }
function ( name , data ) { if ( name === ANY_STATE ) throw new Error ( 'state name "' + ANY_STATE + '" is forbidden' ) data = _ . clone ( data ) data . enter = this . _collectMethods ( ( data . enter || [ ] ) ) data . leave = this . _collectMethods ( ( data . leave || [ ] ) ) this . _states [ name ] = data }
Declares a new state on the state machine
Declares a new state on the state machine