{"size": 422, "ext": "js", "max_stars_repo_path": "random.js", "max_stars_repo_name": "haypers/space-2d", "max_stars_repo_stars_event_min_datetime": "2015-11-04T06:41:33.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-11T00:50:59.000Z", "max_issues_repo_path": "random.js", "max_issues_repo_name": "haypers/space-2d", "max_issues_repo_issues_event_min_datetime": "2016-10-25T10:53:29.000Z", "max_issues_repo_issues_event_max_datetime": "2020-03-05T00:50:26.000Z", "max_forks_repo_path": "random.js", "max_forks_repo_name": "haypers/space-2d", "max_forks_repo_forks_event_min_datetime": "2016-05-06T18:48:44.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-14T15:08:52.000Z"}
{"max_stars_count": 138, "max_issues_count": 2, "max_forks_count": 26, "avg_line_length": 20.0952380952, "max_line_length": 62, "alphanum_fraction": 0.6090047393}
"use strict";

const rng = require('rng');

export function generateRandomSeed() {
    return (Math.random() * 1000000000000000000).toString(36);
}

export function hashcode(str) {
    var hash = 0;
    for (var i = 0; i < str.length; i++) {
        var char = str.charCodeAt(i)
        hash += (i + 1) * char;
    }
    return hash;
}

export function rand(seed, offset) {
  return new rng.MT(hashcode(seed) + offset);
}
