linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
562 stars 142 forks source link

Update implementation of removeMatches to use removeMany #572

Closed Jan-PieterBaert closed 1 year ago

Jan-PieterBaert commented 1 year ago

Since removeMany and removeMatches both do the same thing (removing statements that match the arguments) it's best to let one refer to the other, this avoids bugs (e.g. the one mentioned in https://github.com/linkeddata/rdflib.js/blob/main/src/store.ts#L900 ) happening in one of the implementations.

angelo-v commented 1 year ago

removeMatches seems not to be covered by unit test. I prefer to add tests first, to ensure the refactoring actually does not change the behaviour unintendetly