UNPKG

resumefy

Version:

A simple toolkit to bring your JSON Resume to life

17 lines (16 loc) 482 B
import { readFile } from 'fs/promises'; import { validateObject } from './validate.js'; /** * Validate a resume JSON file. * @param resumeFile The path to the resume JSON file * @returns Promise resolving with a boolean whether resume JSON is valid */ export const validate = async (resumeFile) => { const resumeObject = JSON.parse(await readFile(resumeFile, 'utf-8')); try { return validateObject(resumeObject); } catch { return false; } };