Skip to content

Commit e8c0175

Browse files
authored
Update seeder.js
1 parent 33f6b94 commit e8c0175

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/seeder.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,21 @@ function fileExists(fileName) {
8888
});
8989
}
9090

91+
/**
92+
* Transform all selerialized Buffer value in a Buffer value inside a json object
93+
*
94+
* @param {json} json with serialized Buffer value.
95+
* @return {json} json with Buffer object.
96+
*/
97+
function unmarshalBuffer(json) {
98+
_.forEach(json, function(value, key) {
99+
if (value.type==="Buffer") {
100+
json[key]= new Buffer(value.data);
101+
}
102+
});
103+
return json;
104+
}
105+
91106
/**
92107
* Scrapes seed files out of a given location. This file may contain
93108
* either a simple json object, or an array of simple json objects. An array
@@ -107,21 +122,6 @@ function getSeedsAtLocation(location) {
107122
}
108123
}
109124

110-
/**
111-
* Transform all selerialized Buffer value in a Buffer value inside a json object
112-
*
113-
* @param {json} json with serialized Buffer value.
114-
* @return {json} json with Buffer object.
115-
*/
116-
function unmarshalBuffer(json) {
117-
_.forEach(json, function(value, key) {
118-
if (value.type==='Buffer') {
119-
json[key]= new Buffer(value.data);
120-
}
121-
});
122-
return json;
123-
}
124-
125125
/**
126126
* Locates seeds given a set of files to scrape
127127
* @param {string[]} sources The filenames to scrape for seeds

0 commit comments

Comments
 (0)