Though not wrong, I would recommend inlining this helper into call sites:
|
export function wrapVolunteerProfile( |
|
subjectIri: string, |
|
dataset: DatasetCore, |
|
factory: DataFactory, |
|
): VolunteerProfile { |
|
const subject = factory.namedNode(subjectIri); |
|
return new VolunteerProfile(subject, dataset, factory); |
|
} |
E.g. here
|
const profile = wrapVolunteerProfile(subjectIri, store, DataFactory); |
you could simply write
new VolunteerProfile(subjectIri, store, DataFactory);
No need to make a namedNode from the subjectIri as there's an overload on the constructor that does just that.
Though not wrong, I would recommend inlining this helper into call sites:
volunteering-demo/app/lib/class/VolunteerProfile.ts
Lines 84 to 91 in 9fde751
E.g. here
volunteering-demo/app/lib/helpers/volunteerProfileSkills.ts
Line 206 in 9fde751
you could simply write
No need to make a
namedNodefrom thesubjectIrias there's an overload on the constructor that does just that.