-
-
Save web20opensource/480610c19459be2cb1bc to your computer and use it in GitHub Desktop.
Revisions
-
web20opensource revised this gist
Apr 18, 2015 . 1 changed file with 12 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,27 @@ return movieLists.map( // map receives 3 args // cat - element to iterate // cIndex - index in the array of the element // cCollection - movieLists array // same applies for the rest if the code (cat, cIndex, cCollection) => { //v for videos object return cat.videos.map ( (v,vIndex,vCollection) => { //if you open the debugger (F12) you will see the variables values debugger; //pressing F11 in the next line and with some good luck you can see the code of ex 7 return v.boxarts.filter( (box,bIndex,bCollection) => { debugger; //using coercion with double equals cool! return box.width=='150' }) .map( (filteredResult,fRIndex,fRCollection) => { debugger; return { 'id': v.id , 'title' : v.title , 'boxart': filteredResult.url } }) }).concatAll() -
web20opensource revised this gist
Apr 18, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,18 @@ return movieLists.map( (cat) => { return cat.videos.map ( (v,vIndex,vCollection) => { debugger; return v.boxarts.filter( (box,bIndex,bCollection) => { debugger; return box.width=='150' }) .map( (filteredResult,fRIndex,fRCollection) => { debugger; return { 'id': v.id , 'title' : v.title , 'boxart': filteredResult.url } }) -
web20opensource renamed this gist
Apr 18, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
web20opensource revised this gist
Apr 18, 2015 . 1 changed file with 18 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,20 @@ return movieLists.map( (cat) => { return cat.videos.map ( (v,v2,v3) => { debugger; return v.boxarts.filter( (box,filter2,filter3) => { debugger; return box.width=='150' }) .map( (my150,box2,box3) => { debugger; return { 'id': v.id , 'title' : v.title , 'boxart': my150.url } }) }).concatAll() }).concatAll() -
web20opensource created this gist
Apr 18, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ return movieLists.map( (cat) => { return cat.videos.map ( (v) => { v.boxarts.filter( (box) => { return box.width=='150' }) .map( (f) => { debugger; return { 'id': f.id , 'title' : f.title , 'boxart': box.url } }) })