mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
12 lines
407 B
TypeScript
12 lines
407 B
TypeScript
import { PassportData } from "./types";
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
export function getLocalPassportData(): PassportData {
|
|
const passportDataPath = path.join(__dirname, '../../inputs/passportData.json');
|
|
if ( fs.existsSync(passportDataPath)) {
|
|
return require(passportDataPath);
|
|
} else {
|
|
throw new Error('Passport data not found at inputs/passportData.json');
|
|
}
|
|
} |