Skip to content

Inline redundant utility method #4

Description

@langsamu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions