- Add serve.py to resolve clean Quartz URLs to .html files - Regenerate Quartz site with correct baseUrl http://100.118.5.51:9120 - 196 HTML files emitted; all internal links now resolve
19 lines
552 B
JavaScript
19 lines
552 B
JavaScript
var _getLength = require('./_getLength.js');
|
|
|
|
// Converts lists into objects. Pass either a single array of `[key, value]`
|
|
// pairs, or two parallel arrays of the same length -- one of keys, and one of
|
|
// the corresponding values. Passing by pairs is the reverse of `_.pairs`.
|
|
function object(list, values) {
|
|
var result = {};
|
|
for (var i = 0, length = _getLength(list); i < length; i++) {
|
|
if (values) {
|
|
result[list[i]] = values[i];
|
|
} else {
|
|
result[list[i][0]] = list[i][1];
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = object;
|