index.js
639 Bytes
const fs = require('fs');
const path = require('path');
module.exports = {};
fs
.readdirSync(path.join(__dirname, './ios'))
.filter(file => {
return (file.indexOf('.') !== 0) && (file.slice(-3) === '.js');
})
.forEach(file => {
const model = require(`./ios/${file}`);
module.exports = Object.assign(module.exports, model)
});
fs
.readdirSync(path.join(__dirname, './android'))
.filter(file => {
return (file.indexOf('.') !== 0) && (file.slice(-3) === '.js');
})
.forEach(file => {
const model = require(`./android/${file}`);
module.exports = Object.assign(module.exports, model)
});