1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 05:40:11 +02:00
copilot/frontend/server/locales.js
2016-10-24 16:31:05 +01:00

12 lines
307 B
JavaScript

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(/.*?-.*?/);
}));