Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getBucket = function(string, numbuckets) {
var hash = crc.crc8(string);
var bucket = hash % numbuckets;
return bucket;
};