Skip to content

Commit

Permalink
Merge pull request #29 from FiloSottile/filippo/base64nopad
Browse files Browse the repository at this point in the history
Add base64nopad
  • Loading branch information
paulmillr committed Dec 20, 2023
2 parents eef8051 + c995e74 commit ee9e1e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
base58xrp,
base32hex,
base32crockford,
base64nopad,
base64url,
base64urlnopad,
} from '@scure/base';
Expand Down
5 changes: 5 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ export const base64: BytesCoder = /* @__PURE__ */ chain(
padding(6),
join('')
);
export const base64nopad: BytesCoder = /* @__PURE__ */ chain(
radix2(6),
alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'),
join('')
);
export const base64url: BytesCoder = /* @__PURE__ */ chain(
radix2(6),
alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'),
Expand Down

0 comments on commit ee9e1e2

Please sign in to comment.