nl_tokens: Add directive helper .
pl_tokens: function addDirective ( type ) { return function ( name , directive ) { if ( typeof name === 'function' ) { directive = name } if ( typeof directive !== 'function' ) { throw new TypeError ( 'Directive must be a function' ) } name = typeof name === 'string' ? name : directive . name if ( ! name ) { throw new TypeError ( 'Directive function must have a name' ) } directive . $name = name Toxy [ <mask> ] [ name ] = directive return Toxy } }