mirror of
https://github.com/veggiemonk/awesome-docker.git
synced 2024-12-22 06:05:03 -05:00
load json readfileSync
This commit is contained in:
parent
3bdaf57c76
commit
fda26b09a2
@ -1,5 +1,5 @@
|
|||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
const exclude = require('./exclude_in_test.json');
|
import {readFileSync} from 'fs';
|
||||||
|
|
||||||
const LINKS_OPTIONS = {
|
const LINKS_OPTIONS = {
|
||||||
redirect: 'error',
|
redirect: 'error',
|
||||||
@ -78,6 +78,8 @@ async function batch_fetch({ arr, get, post_filter_func, BATCH_SIZE = 8 }) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const data = readFileSync('./tests/exclude_in_test.json')
|
||||||
|
const exclude = JSON.parse(data)
|
||||||
const exclude_length = exclude.length;
|
const exclude_length = exclude.length;
|
||||||
const exclude_from_list = (link) => {
|
const exclude_from_list = (link) => {
|
||||||
let is_excluded = false;
|
let is_excluded = false;
|
||||||
@ -90,7 +92,7 @@ const exclude_from_list = (link) => {
|
|||||||
return is_excluded;
|
return is_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export default {
|
||||||
LOG,
|
LOG,
|
||||||
handleFailure,
|
handleFailure,
|
||||||
extract_all_links,
|
extract_all_links,
|
||||||
|
Loading…
Reference in New Issue
Block a user