nl_tokens: ---------------------------------------------- FAVORITES controls the list of favorites . constructor expects a user as uri . ----------------------------------------------
pl_tokens: function ( user ) { this . favorites = { } this . favoritesURI = '' if ( ! user ) { // TODO is this even useful? return } this . user = user . split ( '#' ) [ 0 ] let created = kb . each ( kb . sym ( <mask> ) , SIOC ( 'creator_of' ) ) for ( let c in created ) { if ( kb . whether ( created [ c ] , RDF ( 'type' ) , SIOCt ( 'FavouriteThings' ) ) ) { this . favoritesURI = created [ c ] var favs = kb . each ( created [ c ] , SIOC ( 'container_of' ) ) for ( var f in favs ) { this . favorites [ favs [ f ] ] = '' } break } } }