mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-04-23 00:18:03 +00:00
15 lines
438 B
JavaScript
15 lines
438 B
JavaScript
// Copyright 2020-2021 @polkadot/phishing authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import fs from 'fs';
|
|
|
|
function sortSection (values) {
|
|
return values.sort((a, b) => a.localeCompare(b));
|
|
}
|
|
|
|
const original = JSON.parse(fs.readFileSync('all.json', 'utf-8'));
|
|
const allow = sortSection(original.allow);
|
|
const deny = sortSection(original.deny);
|
|
|
|
fs.writeFileSync('all.json', JSON.stringify({ allow, deny }, null, 2));
|