Skip to content

Commit

Permalink
style: run deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oplik0 authored Jan 21, 2022
1 parent 79fe649 commit bf28980
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# base91-deno

more space efficient encoding than base64

[![Deno CI](https://github.com/oplik0/base91-deno/workflows/Deno%20CI/badge.svg)](https://github.com/oplik0/base91-deno/actions)
Expand All @@ -10,11 +11,12 @@ Encoding:
```ts
import { encode } from "https://deno.land/x/base91/base91.ts";
const encoder = new TextEncoder(); //converts utf-8 string to Uint8Array
const input = encoder.encode("test"); //Uint8Array(4) [ 116, 101, 115, 116 ]
const input = encoder.encode("test"); //Uint8Array(4) [ 116, 101, 115, 116 ]
const result = encode(input); //"fPNKd"
```

Decoding:

```ts
import { decode } from "https://deno.land/x/base91/base91.ts";
const decoder = new TextDecoder("utf-8"); //used to convert Uint8Array to utf-8 string
Expand All @@ -31,10 +33,13 @@ deno test
```

This project is using Deno built-in formatter. You can format your code using:

```bash
deno fmt
```

Or ensure it's following its rules with:

```bash
deno fmt --check
```
8 changes: 4 additions & 4 deletions base91_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { encode, decode } from "./base91.ts";
import { decode, encode } from "./base91.ts";

const encoder = new TextEncoder();
const testCases = [
Expand Down Expand Up @@ -43,11 +43,11 @@ const testCases = [
"ಬಾ ಇಲ್ಲಿ ಸಂಭವಿಸು ಇಂದೆನ್ನ ಹೃದಯದಲಿ",
'J1QP,jREln;Kig<!^3pM,j_Dq<Fugg{$J1sL,j:Dq<Au5{C?r*Y|RB%AW^@(QPrnn25rhvJ1;OskKDpf`tggb%^30L,j8Dq<}ti;">20*$.sB',
],
// input that could trigger undefined
// input that could trigger undefined
[
"\x8a\x04\x5a\x2a\x25\x5c\x23\x7d\x4a\x33\x64\x00\x65\x1a\x08",
"Yelt,de)Uz)OYvO\"LlgA"
]
'Yelt,de)Uz)OYvO"LlgA',
],
];

Deno.test({
Expand Down

0 comments on commit bf28980

Please sign in to comment.