initial commit
This commit is contained in:
1
server/node_modules/farmhash-modern/lib/.tsbuildinfo
generated
vendored
Normal file
1
server/node_modules/farmhash-modern/lib/.tsbuildinfo
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
server/node_modules/farmhash-modern/lib/browser.d.ts
generated
vendored
Normal file
40
server/node_modules/farmhash-modern/lib/browser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export declare function bigqueryFingerprint(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash32WithSeed(input: string | Uint8Array, seed: number): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash64WithSeed(input: string | Uint8Array, seed: bigint): bigint;
|
||||
78
server/node_modules/farmhash-modern/lib/browser.js
generated
vendored
Normal file
78
server/node_modules/farmhash-modern/lib/browser.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import * as farmhash from '../bin/bundler/farmhash_modern.js';
|
||||
function asBuffer(input) {
|
||||
if (typeof input === 'string') {
|
||||
return new TextEncoder().encode(input);
|
||||
}
|
||||
if (input instanceof Uint8Array) {
|
||||
return input;
|
||||
}
|
||||
throw new Error('Expected input to be a string or Uint8Array');
|
||||
}
|
||||
function asUnsigned32BitNumber(input) {
|
||||
if (input === input >>> 0) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 32-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
function asUnsigned64BitNumber(input) {
|
||||
if (typeof input === 'bigint' &&
|
||||
input >= 0 &&
|
||||
input <= 18446744073709551615n) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 64-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export function fingerprint32(input) {
|
||||
return farmhash.fingerprint32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export function fingerprint64(input) {
|
||||
return farmhash.fingerprint64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export function bigqueryFingerprint(input) {
|
||||
return farmhash.bigquery_fingerprint(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export function hash32(input) {
|
||||
return farmhash.hash32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export function hash32WithSeed(input, seed) {
|
||||
return farmhash.hash32_with_seed(asBuffer(input), asUnsigned32BitNumber(seed));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export function hash64(input) {
|
||||
return farmhash.hash64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export function hash64WithSeed(input, seed) {
|
||||
return farmhash.hash64_with_seed(asBuffer(input), asUnsigned64BitNumber(seed));
|
||||
}
|
||||
78
server/node_modules/farmhash-modern/lib/index.cjs
generated
vendored
Normal file
78
server/node_modules/farmhash-modern/lib/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
const farmhash = require('../bin/nodejs/farmhash_modern.js')
|
||||
function asBuffer(input) {
|
||||
if (typeof input === 'string') {
|
||||
return new TextEncoder().encode(input);
|
||||
}
|
||||
if (input instanceof Uint8Array) {
|
||||
return input;
|
||||
}
|
||||
throw new Error('Expected input to be a string or Uint8Array');
|
||||
}
|
||||
function asUnsigned32BitNumber(input) {
|
||||
if (input === input >>> 0) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 32-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
function asUnsigned64BitNumber(input) {
|
||||
if (typeof input === 'bigint' &&
|
||||
input >= 0 &&
|
||||
input <= 18446744073709551615n) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 64-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
exports.fingerprint32 = function fingerprint32(input) {
|
||||
return farmhash.fingerprint32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
exports.fingerprint64 = function fingerprint64(input) {
|
||||
return farmhash.fingerprint64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
exports.bigqueryFingerprint = function bigqueryFingerprint(input) {
|
||||
return farmhash.bigquery_fingerprint(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
exports.hash32 = function hash32(input) {
|
||||
return farmhash.hash32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
exports.hash32WithSeed = function hash32WithSeed(input, seed) {
|
||||
return farmhash.hash32_with_seed(asBuffer(input), asUnsigned32BitNumber(seed));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
exports.hash64 = function hash64(input) {
|
||||
return farmhash.hash64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
exports.hash64WithSeed = function hash64WithSeed(input, seed) {
|
||||
return farmhash.hash64_with_seed(asBuffer(input), asUnsigned64BitNumber(seed));
|
||||
}
|
||||
40
server/node_modules/farmhash-modern/lib/index.d.cts
generated
vendored
Normal file
40
server/node_modules/farmhash-modern/lib/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export declare function bigqueryFingerprint(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash32WithSeed(input: string | Uint8Array, seed: number): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash64WithSeed(input: string | Uint8Array, seed: bigint): bigint;
|
||||
40
server/node_modules/farmhash-modern/lib/index.d.mts
generated
vendored
Normal file
40
server/node_modules/farmhash-modern/lib/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export declare function bigqueryFingerprint(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash32WithSeed(input: string | Uint8Array, seed: number): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash64WithSeed(input: string | Uint8Array, seed: bigint): bigint;
|
||||
40
server/node_modules/farmhash-modern/lib/index.d.ts
generated
vendored
Normal file
40
server/node_modules/farmhash-modern/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export declare function fingerprint64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export declare function bigqueryFingerprint(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash32(input: string | Uint8Array): number;
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash32WithSeed(input: string | Uint8Array, seed: number): number;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export declare function hash64(input: string | Uint8Array): bigint;
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export declare function hash64WithSeed(input: string | Uint8Array, seed: bigint): bigint;
|
||||
78
server/node_modules/farmhash-modern/lib/index.js
generated
vendored
Normal file
78
server/node_modules/farmhash-modern/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import * as farmhash from '../bin/nodejs/farmhash_modern.js';
|
||||
function asBuffer(input) {
|
||||
if (typeof input === 'string') {
|
||||
return new TextEncoder().encode(input);
|
||||
}
|
||||
if (input instanceof Uint8Array) {
|
||||
return input;
|
||||
}
|
||||
throw new Error('Expected input to be a string or Uint8Array');
|
||||
}
|
||||
function asUnsigned32BitNumber(input) {
|
||||
if (input === input >>> 0) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 32-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
function asUnsigned64BitNumber(input) {
|
||||
if (typeof input === 'bigint' &&
|
||||
input >= 0 &&
|
||||
input <= 18446744073709551615n) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 64-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export function fingerprint32(input) {
|
||||
return farmhash.fingerprint32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export function fingerprint64(input) {
|
||||
return farmhash.fingerprint64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export function bigqueryFingerprint(input) {
|
||||
return farmhash.bigquery_fingerprint(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export function hash32(input) {
|
||||
return farmhash.hash32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export function hash32WithSeed(input, seed) {
|
||||
return farmhash.hash32_with_seed(asBuffer(input), asUnsigned32BitNumber(seed));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export function hash64(input) {
|
||||
return farmhash.hash64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export function hash64WithSeed(input, seed) {
|
||||
return farmhash.hash64_with_seed(asBuffer(input), asUnsigned64BitNumber(seed));
|
||||
}
|
||||
78
server/node_modules/farmhash-modern/lib/index.mjs
generated
vendored
Normal file
78
server/node_modules/farmhash-modern/lib/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import * as farmhash from '../bin/nodejs/farmhash_modern.js';
|
||||
function asBuffer(input) {
|
||||
if (typeof input === 'string') {
|
||||
return new TextEncoder().encode(input);
|
||||
}
|
||||
if (input instanceof Uint8Array) {
|
||||
return input;
|
||||
}
|
||||
throw new Error('Expected input to be a string or Uint8Array');
|
||||
}
|
||||
function asUnsigned32BitNumber(input) {
|
||||
if (input === input >>> 0) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 32-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
function asUnsigned64BitNumber(input) {
|
||||
if (typeof input === 'bigint' &&
|
||||
input >= 0 &&
|
||||
input <= 18446744073709551615n) {
|
||||
return input;
|
||||
}
|
||||
throw new Error(`Expected input to be a 64-bit unsigned integer, got ${input}`);
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export function fingerprint32(input) {
|
||||
return farmhash.fingerprint32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*/
|
||||
export function fingerprint64(input) {
|
||||
return farmhash.fingerprint64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based i64 for a string or an array of bytes.
|
||||
* Fingerprint value should be portable and stable across library versions
|
||||
* and platforms.
|
||||
*
|
||||
* This matches the format used by BigQuery's FARM_FINGERPRINT function.
|
||||
*/
|
||||
export function bigqueryFingerprint(input) {
|
||||
return farmhash.bigquery_fingerprint(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export function hash32(input) {
|
||||
return farmhash.hash32(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u32 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export function hash32WithSeed(input, seed) {
|
||||
return farmhash.hash32_with_seed(asBuffer(input), asUnsigned32BitNumber(seed));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes. Hash value may
|
||||
* vary with library version.
|
||||
*/
|
||||
export function hash64(input) {
|
||||
return farmhash.hash64(asBuffer(input));
|
||||
}
|
||||
/**
|
||||
* Create a new farmhash based u64 for an array of bytes with a given seed.
|
||||
* Hash value may vary with library version.
|
||||
*/
|
||||
export function hash64WithSeed(input, seed) {
|
||||
return farmhash.hash64_with_seed(asBuffer(input), asUnsigned64BitNumber(seed));
|
||||
}
|
||||
Reference in New Issue
Block a user