lib/utils/fs.js
function saveModelSync (modelName, modelMetadata, modelDir) {
  const buffer = `const Arrow = require('arrow')
var Model = Arrow.Model.extend('${modelName}', ${JSON.stringify(modelMetadata, null, '\t')})
module.exports = Model`
  fs.writeFileSync(path.join(modelDir, modelMetadata.name.toLowerCase() + '.js'), buffer)
}
function saveModelSync (modelName, modelMetadata, modelDir) {
  const buffer = `const Arrow = require('arrow')
var Model = Arrow.Model.extend('${modelName}', ${JSON.stringify(modelMetadata, null, '\t')})
module.exports = Model`
  fs.writeFileSync(path.join(modelDir, modelMetadata.name.toLowerCase() + '.js'), buffer)
}
function saveModelSync ( modelName , modelMetadata , modelDir ) { const buffer = ` ${ modelName } ${ JSON . stringify ( modelMetadata , null , '\t' ) } ` fs . writeFileSync ( path . join ( modelDir , modelMetadata . name . toLowerCase ( ) + '.js' ) , buffer ) }
Saves model to disk

@param {string} modelName the name model
@param {object} modelMetadata metadata that describes the model
@param {string} modelDir the directory where to save the model
Saves model to disk