node_js_ipqs_db_reader
Version:
A Node JS implementation of the IPQualityScore flat file IP reputation database reader.
18 lines (17 loc) • 499 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class FraudScore {
constructor() {
this.raw = [];
}
setFraudScore(strictness, value) {
this.raw[strictness] = value;
}
getFraudScore(strictness) {
if (this.raw[strictness] === undefined) {
throw new Error("Invalid or nonexistant strictness. Please check the call and try again.");
}
return this.raw[strictness];
}
}
exports.default = FraudScore;