Minor refactor

This commit is contained in:
Buu Nguyen 2014-06-07 18:53:14 -07:00
parent def8dd974d
commit cb3926af86
2 changed files with 3 additions and 2 deletions

View File

@ -101,7 +101,7 @@ GitHub.prototype.fetchData = function(opts, cb) {
// split work in chunks to prevent blocking UI on large repos
nextChunk(0)
function nextChunk(iteration) {
var chunkSize = 500
var chunkSize = 300
, baseIndex = iteration * chunkSize
, i
, item, path, type, index, name, moduleUrl

View File

@ -3,12 +3,13 @@ const
INI_SECTION = /^\s*\[\s*([^\]]*)\s*\]\s*$/
, INI_COMMENT = /^\s*;.*$/
, INI_PARAM = /^\s*([\w\.\-\_]+)\s*=\s*(.*?)\s*$/
, SEPARATOR = /\r\n|\r|\n/
function parseGitmodules(data, cb) {
if (!data) return cb()
var submodules = {}
, lines = data.split(/\r\n|\r|\n/)
, lines = data.split(SEPARATOR)
, lastPath
lines.forEach(function(line) {