@atlaskit/adf-utils
Version:
Set of utilities to traverse, modify and create ADF documents.
15 lines (14 loc) • 376 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hash = void 0;
// djb2 hashing algorithm www.cse.yorku.ca/~oz/hash.html
var hash = exports.hash = function hash(input) {
var result = 5381;
var index = input.length;
while (index > 0) {
result = result * 33 ^ input.charCodeAt(--index);
}
return (result >>> 0).toString();
};