Remove remaining JSON requires (#20110)
* Remove remaining JSON requires * Lint * Update feature-flags.js
This commit is contained in:
14
lib/read-json-file.js
Normal file
14
lib/read-json-file.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = function readJsonFile (xpath) {
|
||||
return JSON.parse(
|
||||
fs.readFileSync(
|
||||
path.join(
|
||||
process.cwd(),
|
||||
xpath
|
||||
),
|
||||
'utf8'
|
||||
)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user