mirror of
https://github.com/partofmyid/register.git
synced 2026-06-05 18:46:50 +07:00
update script
This commit is contained in:
parent
8de5a77005
commit
2934db27ec
10 changed files with 26 additions and 44 deletions
12
scripts/dict.js
Normal file
12
scripts/dict.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const fs = require('fs');
|
||||
|
||||
const dict = fs.readdirSync('./domains').map(f => [
|
||||
f.split('.').slice(0, -1).join('.'),
|
||||
JSON.parse(fs.readFileSync(`./domains/${f}`, 'utf8')).owner.username // owner
|
||||
]).reduce((v, [s, o]) => {
|
||||
if (!v[o]) v[o] = [];
|
||||
v[o].push(s);
|
||||
return v;
|
||||
}, {});
|
||||
|
||||
console.log(dict);
|
||||
Loading…
Add table
Add a link
Reference in a new issue