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';
|
||||
const exclude = require('./exclude_in_test.json');
|
||||
import {readFileSync} from 'fs';
|
||||
|
||||
const LINKS_OPTIONS = {
|
||||
redirect: 'error',
|
||||
@ -78,6 +78,8 @@ async function batch_fetch({ arr, get, post_filter_func, BATCH_SIZE = 8 }) {
|
||||
return result;
|
||||
}
|
||||
|
||||
const data = readFileSync('./tests/exclude_in_test.json')
|
||||
const exclude = JSON.parse(data)
|
||||
const exclude_length = exclude.length;
|
||||
const exclude_from_list = (link) => {
|
||||
let is_excluded = false;
|
||||
@ -90,7 +92,7 @@ const exclude_from_list = (link) => {
|
||||
return is_excluded;
|
||||
};
|
||||
|
||||
export {
|
||||
export default {
|
||||
LOG,
|
||||
handleFailure,
|
||||
extract_all_links,
|
||||
|
Loading…
Reference in New Issue
Block a user