nl_tokens: Applies { @link module : stateful~StatefulMixin|StatefulMixin } to a target object .
pl_tokens: function stateful ( target , defaultState ) { assign ( target , StatefulMixin ) ; // This happens after the mixing-in because we need to replace the `state` // added in that step. target . state = assign ( { } , target . state , defaultState ) ; // Auto-bind the `handleStateChanged` method of the target object if it exists. if ( typeof target . handleStateChanged === 'function' && isEvented ( target ) ) { target . on ( 'statechanged' , <mask> . handleStateChanged ) ; } return target ; }