UNPKG

@atlaskit/adf-utils

Version:

Set of utilities to traverse, modify and create ADF documents.

9 lines 265 B
// djb2 hashing algorithm www.cse.yorku.ca/~oz/hash.html export var hash = function hash(input) { var result = 5381; var index = input.length; while (index > 0) { result = result * 33 ^ input.charCodeAt(--index); } return (result >>> 0).toString(); };