How to use the murmurhash.v2 function in murmurhash

To help you get started, we’ve selected a few murmurhash examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pubpub / pubpub / src / components / Markdown / Markdown.jsx View on Github external
return {children[0]};
		case 'htmlblock':
			const text = children[0];
			if (typeof text === 'string' || text instanceof String) {
				return {text};
			}
			break;
		case 'p':
			// if (children[0] === null){ return null; }
			// console.log('p arguments', arguments);
			props.className = 'p-block';
			props['data-hash'] = children[0] ? murmur.v2(children[0]) : 0;
			Component = 'div';
			break;
		case 'li':
			props['data-hash'] = children[0] ? murmur.v2(children[0]) : 0;
			break;
		case 'a':
			props['target'] = "_blank";
			break;
		case 'hr':
			return ;

		case 'references':
			return ;

		case 'footnotes':
			return ;

		case 'pubheader':
			// console.log(arguments);
			Component = 'div';
github iLanguage / iLanguage / BenchmarkingService / lib / benchmark.js View on Github external
function createId (benchmark) {
    return parseInt(murmurhash.v2(benchmark.name + benchmark.version), 10);
}
github iLanguage / iLanguage / BenchmarkingService / lib / backend.js View on Github external
function createId (backend) {
    return parseInt(murmurhash.v2(backend.name + backend.version), 10);
}
github iLanguage / iLanguage / BenchmarkingService / lib / instrumentation.js View on Github external
function createId (instrumentation) {
    return parseInt(murmurhash.v2(instrumentation.name + instrumentation.version), 10);
}

murmurhash

A Node.js module for the optimized JavaScript implementation of the MurmurHash algorithms.

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Popular murmurhash functions