joyent-portal/frontend/server/locales.js

12 lines
307 B
JavaScript
Raw Normal View History

2016-10-20 22:42:39 +03:00
const uniq = require('lodash.uniq');
const fs = require('fs');
const path = require('path');
const files = fs.readdirSync(path.join(__dirname, '../static/locales'));
module.exports = uniq(files.map((file) => {
return file.replace(/\.js$/, '');
}).filter((file) => {
return file.match(/.*?-.*?/);
}));