UNPKG

@11me/xparse

Version:

Simple html and rss parser

14 lines (13 loc) 381 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hashCode = void 0; const hashCode = (s) => { let hash = 0; for (let i = 0; i < s.length; i++) { const char = s.charCodeAt(i); hash = (hash << 5) - hash + char; hash &= hash; } return new Uint32Array([hash])[0].toString(36); }; exports.hashCode = hashCode;