nl_tokens: Updates preference item value . Preference value should be defined first with <code > define< / code > method .
pl_tokens: function ( name , value ) { var prefs = name ; if ( _ . isString ( <mask> ) ) { prefs = { } ; prefs [ name ] = value ; } _ . each ( prefs , function ( v , k ) { if ( ! ( k in defaults ) ) { throw 'Property "' + k + '" is not defined. You should define it first with `define` method of current module' ; } // do not set value if it equals to default value if ( v !== defaults [ k ] . value ) { // make sure we have value of correct type switch ( typeof defaults [ k ] . value ) { case 'boolean' : v = toBoolean ( v ) ; break ; case 'number' : v = parseInt ( v + '' , 10 ) || 0 ; break ; default : // convert to string if ( v !== null ) { v += '' ; } } preferences [ k ] = v ; } else if ( k in preferences ) { delete preferences [ k ] ; } } ) ; }