UNPKG

mongo-migrations

Version:

Asynchronous MongoDB migration framework for Node.js based on node-migrate

11 lines (8 loc) 252 B
const path = require('path'); module.exports = (c) => { const compiler = c.split(':'); const ext = compiler[0]; const mod = compiler[1]; if (mod[0] === '.') mod = path.join(process.cwd(), mod); require(mod)({ extensions: ['.' + ext] }); };