nl_tokens: * @method assign ( <obj1 > <obj2 > ... ) @returns String @short Assigns variables to tokens in a string . @extra If an object is passed it s properties can be assigned using the object s keys . If a non - object ( string number etc . ) is passed it can be accessed by the argument number beginning with 1 ( as with regex tokens ) . Multiple objects can be passed and will be merged together ( original objects are unaffected ) . @example
pl_tokens: function ( ) { var assign = { } ; multiArgs ( arguments , function ( a , i ) { if ( isObject ( a ) ) { simpleMerge ( assign , a ) ; } else { assign [ i + 1 ] = a ; } } ) ; return this . replace ( / \{([^{]+?)\} / g , function ( m , key ) { return hasOwnProperty ( assign , <mask> ) ? assign [ key ] : m ; } ) ; }