nl_tokens: Recursive flatten
pl_tokens: function flattenize ( routes , prefix , parent ) { const list = { } Object . keys ( routes . local ) . forEach ( ( method ) => { const localName = prefix === '' ? '/' : ` ${ prefix } ` if ( ! list [ localName ] ) { list [ localName ] = { } } list [ localName ] [ method ] = [ ] . concat ( parent . before , routes . before , routes . local [ method ] , routes . after , parent . <mask> ) } ) Object . keys ( routes . scoped ) . forEach ( ( scope ) => { const scoped = routes . scoped [ scope ] const listeners = flattenize ( scoped , ` ${ prefix } ${ scope } ` , { before : parent . before . concat ( routes . before ) , after : routes . after . concat ( parent . after ) , } ) Object . assign ( list , listeners ) } ) return list }