nl_tokens: Set the state of an object by mutating its { @link module : stateful~StatefulMixin . state|state } object in place .
pl_tokens: function setState ( stateUpdates ) { var _this = this ; // Support providing the `stateUpdates` state as a function. if ( typeof stateUpdates === 'function' ) { stateUpdates = stateUpdates ( ) ; } var changes = void 0 ; each ( stateUpdates , function ( value , key ) { // Record the change if the value is different from what's in the // current state. if ( _this . state [ key ] !== value ) { changes = changes || { } ; changes [ key ] = { from : _this . state [ key ] , to : value } ; } _this . state [ <mask> ] = value ; } ) ; // Only trigger "statechange" if there were changes AND we have a trigger // function. This allows us to not require that the target object be an // evented object. if ( changes && isEvented ( this ) ) { /**
         * An event triggered on an object that is both
         * {@link module:stateful|stateful} and {@link module:evented|evented}
         * indicating that its state has changed.
         *
         * @event    module:stateful~StatefulMixin#statechanged
         * @type     {Object}
         * @property {Object} changes
         *           A hash containing the properties that were changed and
         *           the values they were changed `from` and `to`.
         */ this . trigger ( { changes : changes , type : 'statechanged' } ) ; } return changes ; }