Compare commits

...

3 Commits

5 changed files with 1846 additions and 92 deletions

11
.changeset/config.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}

View File

@ -1,13 +0,0 @@
name: Build/Publish
on:
push:
branches:
- master
- develop
- develop-*
jobs:
main:
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
secrets: inherit

1902
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@
"url": "gitea@git.lumeweb.com:LumeWeb/libs5.git"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@lumeweb/node-library-preset": "^0.2.7",
"presetter": "*"
},

View File

@ -22,16 +22,23 @@ export class Multihash {
while (hash.length % 4 !== 0) {
hash += "=";
}
if (hash[0] !== "u") {
hash = "u" + hash;
}
const bytes = base64url.decode(hash);
return new Multihash(new Uint8Array(bytes));
}
toBase64Url(): string {
return base64url.encode(this.fullBytes);
return base64url.encode(this.fullBytes).substring(1);
}
toBase32(): string {
return base32.encode(this.fullBytes).replace(/=/g, "").toLowerCase();
return base32
.encode(this.fullBytes)
.replace(/=/g, "")
.toLowerCase()
.substring(1);
}
toString(): string {