From 119845f9c2bc560700a1ee25606d80a262e8f49d Mon Sep 17 00:00:00 2001 From: Tyler Hall Date: Tue, 5 Dec 2023 10:16:11 -0500 Subject: [PATCH] style(connect): deno fmt --- packages/connect/README.md | 36 ++++++++++++++++++++--- packages/connect/deno/services/storage.ts | 2 +- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/connect/README.md b/packages/connect/README.md index 55d0a1e5..98f840c8 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -9,6 +9,34 @@ hyper-connect is a client for hyper --- + + +- [Table of Contents](#table-of-contents) +- [Install](#install) + - [NodeJS](#nodejs) +- [Getting Started](#getting-started) + - [NodeJS (TypeScript)](#nodejs-typescript) + - [NodeJS (ESM)](#nodejs-esm) + - [NodeJS (CJS)](#nodejs-cjs) + - [A Note for NodeJS](#a-note-for-nodejs) + - [Node 18 and `localhost`](#node-18-and-localhost) + - [Deno](#deno) +- [Examples](#examples) + - [How to add a document to hyper data?](#how-to-add-a-document-to-hyper-data) + - [How to get all the documents of type 'movie'?](#how-to-get-all-the-documents-of-type-movie) + - [How to add a cache key/value pair to hyper cache?](#how-to-add-a-cache-keyvalue-pair-to-hyper-cache) +- [Documentation](#documentation) + - [data](#data) + - [cache](#cache) + - [search](#search) + - [storage](#storage) + - [queue](#queue) + - [Verify Signature](#verify-signature) + - [Contributing](#contributing) + - [License](#license) + + + ## Table of Contents - [Install](#install) @@ -95,10 +123,10 @@ import { Readable } from 'node:stream' // Convert the ReadableStream to a NodeJS.ReadableStream await hyper.storage.download('foo.png') - .then((res) => { - if (!res.ok) throw res - return Readable.fromWeb(res.object) - }) + .then((res) => { + if (!res.ok) throw res + return Readable.fromWeb(res.object) + }) // Or convert to a ReadbleStream from a NodeJS.ReadableStream await hyper.storage.upload('foo.png', Readable.toWeb(createReadStream('foo.png'))) diff --git a/packages/connect/deno/services/storage.ts b/packages/connect/deno/services/storage.ts index e5219599..99893d7d 100644 --- a/packages/connect/deno/services/storage.ts +++ b/packages/connect/deno/services/storage.ts @@ -25,7 +25,7 @@ export const upload = (name: string, data: ReadableStream) => async (h: HyperReq */ // deno-lint-ignore ban-ts-comment // @ts-ignore - duplex: 'half' + duplex: 'half', }) }