src/css.js
function createHash(input) {
	let hash = 0;
	if (input.length === 0) {
		return hash;
	}
	for (let i = 0; i < input.length; i++) {
		const char = input.charCodeAt(i);
		hash = ((hash << 5) - hash) + char;
		// Convert to 32bit integer
		hash &= hash;
	}
	return hash;
}
function createHash(input) {
	let hash = 0;
	if (input.length === 0) {
		return hash;
	}
	for (let i = 0; i < input.length; i++) {
		const char = input.charCodeAt(i);
		hash = ((hash << 5) - hash) + char;
		// Convert to 32bit integer
		hash &= hash;
	}
	return hash;
}
function createHash ( input ) { let hash = 0 ; if ( input . length === 0 ) { return hash ; } for ( let i = 0 ; i < input . length ; i ++ ) { const char = input . charCodeAt ( i ) ; hash = ( ( hash << 5 ) - hash ) + char ; // Convert to 32bit integer hash &= hash ; } return hash ; }
Based on http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/
Based on http : // werxltd . com / wp / 2010 / 05 / 13 / javascript - implementation - of - javas - string - hashcode - method /