Development In Progress - more docs, examples and general explanation maybe on the way (we'll see if it works first)
Library for comparing Salesforce profile and permission set metadata
const profileDiff = new ProfileDiff();
await profileDiff.setBaseProfile([base profile xml]);
await profileDiff.addTargetProfile([target profile xml]);
const actualDiff = await profileDiff.getDiff();