Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove hyperdyperid dependency #2

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: remove hyperdyperid dependency
  • Loading branch information
G-Rath committed Apr 27, 2024
commit ff5740c0d2574cd691a19549b83a60f9839150b3
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -56,9 +56,7 @@
"peerDependencies": {
"tslib": "2"
},
"dependencies": {
"hyperdyperid": "^1.2.0"
},
"dependencies": {},
"devDependencies": {
"@types/benchmark": "^2.1.2",
"@types/jest": "^29.5.12",
9 changes: 8 additions & 1 deletion src/buffers/utf8/CachedUtf8Decoder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import decodeUtf8 from './decodeUtf8/v10';
import {randomU32} from 'hyperdyperid/lib/randomU32';

let x = 1 + Math.round(Math.random() * ((-1>>>0)-1));

/** Generate a random 32-bit unsigned integer in the specified [min, max] range. */
function randomU32(min: number, max: number): number {
x ^= x << 13; x ^= x >>> 17; x ^= x << 5;
return (x >>> 0) % (max - min + 1) + min;
}

class CacheItem {
constructor(
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -1338,11 +1338,6 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

hyperdyperid@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b"
integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==

ignore@^5.3.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
Loading