Last active
August 29, 2015 14:22
-
-
Save dferber90/2172c200d3a882fa4337 to your computer and use it in GitHub Desktop.
Versions Parsing in ES5
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
// ES5 | |
var versionsMap = {}; | |
lines.forEach(function (line) { | |
// split name@version into [name, version] | |
var lineContents = line.split('@'); | |
var name = lineContents[0]; | |
var version = lineContents[1]; | |
versionsMap[name] = version; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment