0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/shared/data/import/index.js
Hannah Wolfe ba810fb0bb issue #58 - removing the iiwf
Function wrapper and use strict pragma removed from all node files
2013-06-25 13:46:50 +01:00

17 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);
};