tkm-ymmt
4/15/2016 - 4:07 AM

generator js

generator js

  getAllPlaylists: function(){
    if(!this.playlists.length) this.listPlaylists();
    const pl = this.gen.next();
    if(pl.done) return false;
    return this.cms.getVideosInPlaylist(pl.value.getId());
  },
  
  getPlaylist: function*(){
    yield* this.playlists;
  },