rdf-terms
Advanced tools
Comparing version 1.7.0 to 1.7.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getQuads = exports.getDefaultGraphs = exports.getVariables = exports.getLiterals = exports.getBlankNodes = exports.getNamedNodes = exports.getTermsOfType = exports.uniqTerms = exports.TERM_TYPES = void 0; | ||
const rdf_string_1 = require("rdf-string"); | ||
/** | ||
@@ -19,3 +20,7 @@ * All known term types. | ||
function uniqTerms(terms) { | ||
return require('lodash.uniqwith')(terms, (termA, termB) => termA.equals(termB)); | ||
const hash = {}; | ||
return terms.filter(term => { | ||
const termString = rdf_string_1.termToString(term); | ||
return !(termString in hash) && (hash[termString] = true); | ||
}); | ||
} | ||
@@ -22,0 +27,0 @@ exports.uniqTerms = uniqTerms; |
{ | ||
"name": "rdf-terms", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "Convenience functions for handling RDFJS terms", | ||
@@ -34,7 +34,7 @@ "keywords": [ | ||
"@rdfjs/types": "*", | ||
"lodash.uniqwith": "^4.5.0", | ||
"rdf-data-factory": "^1.1.0" | ||
"rdf-data-factory": "^1.1.0", | ||
"rdf-string": "^1.6.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.0", | ||
"@types/jest": "^27.0.0", | ||
"coveralls": "^3.0.0", | ||
@@ -41,0 +41,0 @@ "jest": "^26.0.0", |
47754
10
594
+ Addedrdf-string@^1.6.0
+ Addedrdf-string@1.6.3(transitive)
- Removedlodash.uniqwith@^4.5.0
- Removedlodash.uniqwith@4.5.0(transitive)