Ghost/core/server/data/import/index.js
John O'Nolan d1957958e3 Cleanup indentation and quotes
Aligns all requirements vertically for easier reading + adds single quote standard consistently throughout Ghost, except in long strings.
2013-09-26 15:06:31 +01:00

18 lines
321 B
JavaScript

var when = require('when');
module.exports = function (version, data) {
var importer;
try {
importer = require('./' + version);
} catch (ignore) {
// Zero effs given
}
if (!importer) {
return when.reject("No importer found");
}
return importer.importData(data);
};