From bf28980717e5cece1186e76836a6a854279da6f0 Mon Sep 17 00:00:00 2001 From: Opliko Date: Fri, 21 Jan 2022 22:40:46 +0000 Subject: [PATCH] style: run deno fmt --- README.md | 7 ++++++- base91_test.ts | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1bbfdc7..0e091cf 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 @@ -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 ``` diff --git a/base91_test.ts b/base91_test.ts index 9bb6e55..fb53f9c 100644 --- a/base91_test.ts +++ b/base91_test.ts @@ -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 = [ @@ -43,11 +43,11 @@ const testCases = [ "ಬಾ ಇಲ್ಲಿ ಸಂಭವಿಸು ಇಂದೆನ್ನ ಹೃದಯದಲಿ", 'J1QP,jREln;Kig20*$.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({