refactor: replace fs+util.promisify with fs/promises
This commit is contained in:
parent
3f87685865
commit
4ead3dc4bf
2 changed files with 10 additions and 27 deletions
|
|
@ -1,6 +1,5 @@
|
|||
const fs = require('fs')
|
||||
const { readdir } = require('fs/promises')
|
||||
const path = require('path')
|
||||
const util = require('util')
|
||||
const loader = require('./loading')
|
||||
const matcher = require('./matching')
|
||||
const nameUtils = require('./name-utils')
|
||||
|
|
@ -13,8 +12,6 @@ const OFAC_DATA_DIR = process.env.OFAC_DATA_DIR
|
|||
|
||||
let structs = null
|
||||
|
||||
const readdir = util.promisify(fs.readdir)
|
||||
|
||||
function load () {
|
||||
if (!OFAC_DATA_DIR) {
|
||||
const message = 'The ofacDataDir option has not been set in the environment'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue