Skip to content

Commit

Permalink
Type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Oct 8, 2024
1 parent 85454d8 commit 970467b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ Full documentation available at [base64.56k.guru](https://base64.56k.guru)

Node.js: `npm install @hexagon/base64 --save`

Deno (x): `import { base64 } from "https://deno.land/x/b64@2.0.0/src/base64.ts";`
Deno (x): `import { base64 } from "https://deno.land/x/b64@2.0.2/src/base64.ts";`

Deno (jsr.io): `import { base64 } from "jsr:@hexagon/base64@2.0.0";`
Deno (jsr.io): `import { base64 } from "jsr:@hexagon/base64@2.0.2";`

For browser/cdn usage, refer to the documentation.

Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ TypeScript:

```
// Deno.land/x
import { base64 } from "https://deno.land/x/b64@2.0.0/src/base64.ts";
import { base64 } from "https://deno.land/x/b64@2.0.2/src/base64.ts";
// ... or jsr.io
import { base64 } from "jsr:@hexagon/base64@2.0.0";
import { base64 } from "jsr:@hexagon/base64@2.0.2";
```

### Browser
Expand Down
13 changes: 6 additions & 7 deletions src/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ function toArrayBuffer(data: string, urlMode?: boolean): ArrayBuffer {
}

/**
* Convenience
function for creating a base64 encoded string from an ArrayBuffer instance
* Convenience function for creating a base64 encoded string from an ArrayBuffer instance
* @public
*
* @param {ArrayBuffer} arrBuf - ArrayBuffer to be encoded
Expand Down Expand Up @@ -152,11 +151,11 @@ function validate(encoded: string, urlMode?: boolean): boolean {
* @namespace base64
*/
const base64 = {
toString,
fromString,
toArrayBuffer,
fromArrayBuffer,
validate,
toString: toString,
fromString: fromString,
toArrayBuffer: toArrayBuffer,
fromArrayBuffer: fromArrayBuffer,
validate: validate,
};

export { base64, fromArrayBuffer, fromString, toArrayBuffer, toString, validate };

0 comments on commit 970467b

Please sign in to comment.