CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
index.js12 linesDownload Raw Back to load-json-file
1'use strict';2const path = require('path');3const fs = require('graceful-fs');4const stripBom = require('strip-bom');5const parseJson = require('parse-json');6const pify = require('pify');7 8const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp));9 10module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp));11module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp);12 
basant307/AI_Governance_Project · CoolFace