Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

1
node_modules/string-hash/.npmignore generated vendored Normal file
View File

@@ -0,0 +1 @@
/node_modules

22
node_modules/string-hash/README.md generated vendored Normal file
View File

@@ -0,0 +1,22 @@
string-hash
===========
A fast string hashing function for Node.JS. The particular algorithm is quite
similar to `djb2`, by Dan Bernstein and available
[here](http://www.cse.yorku.ca/~oz/hash.html). Differences include iterating
over the string *backwards* (as that is faster in JavaScript) and using the XOR
operator instead of the addition operator (as described at that page and
because it obviates the need for modular arithmetic in JavaScript).
The hashing function returns a number between 0 and 4294967295 (inclusive).
Thanks to [cscott](https://github.com/cscott) for reminding us how integers
work in JavaScript.
License
-------
To the extend possible by law, The Dark Sky Company, LLC has [waived all
copyright and related or neighboring rights][cc0] to this library.
[cc0]: http://creativecommons.org/publicdomain/zero/1.0/

20
node_modules/string-hash/component.json generated vendored Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "string-hash",
"repo": "darkskyapp/string-hash",
"description": "fast string hashing function",
"version": "1.1.1",
"keywords": [
"string",
"hashing"
],
"dependencies": {},
"development": {
"mocha": "1.3.x"
},
"license": "CC0",
"main": "index.js",
"scripts": [
"index.js"
],
"remotes": []
}

17
node_modules/string-hash/index.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
function hash(str) {
var hash = 5381,
i = str.length;
while(i) {
hash = (hash * 33) ^ str.charCodeAt(--i);
}
/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
* integers. Since we want the results to be always positive, convert the
* signed int to an unsigned by doing an unsigned bitshift. */
return hash >>> 0;
}
module.exports = hash;

27
node_modules/string-hash/package.json generated vendored Normal file
View File

@@ -0,0 +1,27 @@
{
"name": "string-hash",
"version": "1.1.3",
"description": "fast string hashing function",
"license": "CC0-1.0",
"keywords": [
"string",
"hashing"
],
"author": {
"name": "The Dark Sky Company",
"email": "developer@darksky.net"
},
"repository": {
"type": "git",
"url": "git://github.com/darkskyapp/string-hash.git"
},
"main": "./index",
"dependencies": {
},
"devDependencies": {
"mocha": "*"
},
"scripts": {
"test": "mocha"
}
}

13
node_modules/string-hash/test.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
var assert = require("assert"),
hash = require("./");
describe("hash", function() {
it("should hash \"Mary had a little lamb.\" to 1766333550", function() {
assert.equal(hash("Mary had a little lamb."), 1766333550);
});
it("should hash \"Hello, world!\" to 343662184", function() {
assert.equal(hash("Hello, world!"), 343662184);
});
});