From c75454c44b74313030c05a75de0224a1bdf15b7c Mon Sep 17 00:00:00 2001 From: like-nanhai <2274901206@qq.com> Date: Wed, 4 May 2022 18:34:37 +0800 Subject: [PATCH] docs: add module level docs (#2190) --- collections/mod.ts | 4 +++- crypto/mod.ts | 1 + datetime/mod.ts | 5 ++++- dotenv/mod.ts | 4 ++++ flags/mod.ts | 7 +++++-- hash/mod.ts | 6 ++++-- http/mod.ts | 4 ++++ io/mod.ts | 4 ++++ log/mod.ts | 4 ++++ mime/mod.ts | 4 ++++ path/mod.ts | 8 ++++++-- permissions/mod.ts | 4 ++++ signal/mod.ts | 5 +++++ streams/mod.ts | 6 +++++- textproto/mod.ts | 7 +++++-- uuid/mod.ts | 4 ++++ 16 files changed, 66 insertions(+), 11 deletions(-) diff --git a/collections/mod.ts b/collections/mod.ts index 501232076f41..b8c5f6d220ea 100644 --- a/collections/mod.ts +++ b/collections/mod.ts @@ -1,5 +1,7 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. +/** This module is browser compatible. + * @module + */ export * from "./aggregate_groups.ts"; export * from "./associate_by.ts"; diff --git a/crypto/mod.ts b/crypto/mod.ts index f7bdb51b27bc..29d3a2f953cb 100644 --- a/crypto/mod.ts +++ b/crypto/mod.ts @@ -8,6 +8,7 @@ import { /** * A copy of the global WebCrypto interface, with methods bound so they're * safe to re-export. + * @module */ const webCrypto = ((crypto) => ({ getRandomValues: crypto.getRandomValues?.bind(crypto), diff --git a/datetime/mod.ts b/datetime/mod.ts index 66240ef71335..a71c0c36e9b0 100644 --- a/datetime/mod.ts +++ b/datetime/mod.ts @@ -1,5 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. +/** + * This module is browser compatible. + * @module + */ import { DateTimeFormatter } from "./formatter.ts"; diff --git a/dotenv/mod.ts b/dotenv/mod.ts index ac63ae46d45d..a63bd1edce8b 100644 --- a/dotenv/mod.ts +++ b/dotenv/mod.ts @@ -1,4 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * Dotenv config + * @module + */ import { difference, removeEmptyValues } from "./util.ts"; diff --git a/flags/mod.ts b/flags/mod.ts index e4fd78f8e19b..66f625db5c3a 100644 --- a/flags/mod.ts +++ b/flags/mod.ts @@ -1,6 +1,9 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - +/** + * This module is browser compatible. + * + * @module + */ import { assert } from "../_util/assert.ts"; /** The value returned from `parse`. */ diff --git a/hash/mod.ts b/hash/mod.ts index 1eff1033c648..ce344af49071 100644 --- a/hash/mod.ts +++ b/hash/mod.ts @@ -1,6 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. -// This module is browser compatible. - +/** + * This module is browser compatible. + * @module + */ import { Hash } from "./_wasm/hash.ts"; import type { Hasher } from "./hasher.ts"; diff --git a/http/mod.ts b/http/mod.ts index 58cb87c9b622..349a24b1fb83 100644 --- a/http/mod.ts +++ b/http/mod.ts @@ -1,4 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * Http + * @module + */ export * from "./cookie.ts"; export * from "./http_status.ts"; export * from "./server.ts"; diff --git a/io/mod.ts b/io/mod.ts index afe204367c87..0a48afc58e6a 100644 --- a/io/mod.ts +++ b/io/mod.ts @@ -1,4 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * IO + * @module + */ export * from "./buffer.ts"; export * from "./readers.ts"; export * from "./streams.ts"; diff --git a/log/mod.ts b/log/mod.ts index 23fc4c442894..ad624bb11af5 100644 --- a/log/mod.ts +++ b/log/mod.ts @@ -1,4 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * log + * @module + */ import { Logger } from "./logger.ts"; import type { GenericFunction } from "./logger.ts"; import { diff --git a/mime/mod.ts b/mime/mod.ts index 31a6f86f5c07..6c6dd9140d42 100644 --- a/mime/mod.ts +++ b/mime/mod.ts @@ -1,2 +1,6 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * Mime + * @module + */ export * from "./multipart.ts"; diff --git a/path/mod.ts b/path/mod.ts index c96b2af3f0ca..bda7e8cf3e50 100644 --- a/path/mod.ts +++ b/path/mod.ts @@ -1,7 +1,11 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. // Copyright the Browserify authors. MIT License. -// Ported mostly from https://github.com/browserify/path-browserify/ -// This module is browser compatible. + +/** + * Ported mostly from https://github.com/browserify/path-browserify/ + * This module is browser compatible. + * @module + */ import { isWindows } from "../_util/os.ts"; import * as _win32 from "./win32.ts"; diff --git a/permissions/mod.ts b/permissions/mod.ts index 0b59c06be51d..bdb3fb6ae9c4 100644 --- a/permissions/mod.ts +++ b/permissions/mod.ts @@ -1,4 +1,8 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * Permission + * @module + */ const { PermissionDenied } = Deno.errors; diff --git a/signal/mod.ts b/signal/mod.ts index f53cb85088a0..0ecdd01b9d6b 100644 --- a/signal/mod.ts +++ b/signal/mod.ts @@ -1,4 +1,9 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +/** + * Signal + * + * @module + */ import { MuxAsyncIterator } from "../async/mux_async_iterator.ts"; import { deferred } from "../async/deferred.ts"; diff --git a/streams/mod.ts b/streams/mod.ts index daf3a23889f4..da0a0152cb40 100644 --- a/streams/mod.ts +++ b/streams/mod.ts @@ -1,5 +1,9 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. - +/** + * Streams + * + * @module + */ export * from "./buffer.ts"; export * from "./conversion.ts"; export * from "./delimiter.ts"; diff --git a/textproto/mod.ts b/textproto/mod.ts index 61465721aa49..69b15e7076a1 100644 --- a/textproto/mod.ts +++ b/textproto/mod.ts @@ -1,8 +1,11 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. // Based on https://github.com/golang/go/tree/master/src/net/textproto // Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +/** + * Use of this source code is governed by a BSD-style + * license that can be found in the LICENSE file. + * @module + */ import type { BufReader, ReadLineResult } from "../io/buffer.ts"; import { concat } from "../bytes/mod.ts"; diff --git a/uuid/mod.ts b/uuid/mod.ts index 506e28e703f9..831d3fe41ea4 100644 --- a/uuid/mod.ts +++ b/uuid/mod.ts @@ -3,6 +3,10 @@ // Based on https://github.com/kelektiv/node-uuid -> https://www.ietf.org/rfc/rfc4122.txt // Supporting Support for RFC4122 version 1, 4, and 5 UUIDs +/** + * UUID + * @module + */ import * as v1 from "./v1.ts"; import * as v4 from "./v4.ts";