Last active
December 14, 2015 18:19
-
-
Save Darep/5128457 to your computer and use it in GitHub Desktop.
This file contains 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 characters
buildData: function () { | |
var newData, data = api.getSongs(); | |
// Fix paths | |
var transformPath = this.transformPath.bind(this); | |
newData = data.map(function (row) { | |
row.path = transformSongPath(row.path); | |
return row; | |
}); | |
this.data = newData; | |
}, | |
transformPath: function (path) { | |
// ... some simple string transformations ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking for ways to refactor this. How can I make this look nicer and simpler?