Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const sameValue = (datatype, snak, value) => {
if (value.snaktype && value.snaktype !== 'value') {
return snak.snaktype === value.snaktype
}
const snakValue = simplifyClaim(snak)
const comparator = valueComparators[datatype]
if (comparator) {
return comparator(snak, snakValue, value)
} else {
return snakValue === value
}
}
matchClaim: value => claim => {
if (typeof value === 'object') {
if (hasSpecialSnaktype(value)) {
if (claim.mainsnak.snaktype === value.snaktype) return true
}
value = value.value
}
return value === simplifyClaim(claim)
},
getGuid: claim => claim.id