The Deno Standard Library
Go to file
2024-04-10 11:35:11 +10:00
_tools deprecation(console): copy std/console APIs into std/cli and deprecate std/console (#4547) 2024-04-08 14:32:55 +10:00
.devcontainer chore: add development container configuration (#1938) 2022-02-21 14:23:43 +11:00
.github docs: ARCHITECTURE.md (#4559) 2024-04-10 11:27:39 +10:00
archive chore: fix lint error in canary (#4513) 2024-03-22 21:27:04 +01:00
assert chore: enable single-var-declarator lint rule (#4488) 2024-03-14 22:18:00 +11:00
async docs(async): add module example (#4465) 2024-03-11 20:31:11 +11:00
bytes chore: enable single-var-declarator lint rule (#4488) 2024-03-14 22:18:00 +11:00
cli deprecation(console): copy std/console APIs into std/cli and deprecate std/console (#4547) 2024-04-08 14:32:55 +10:00
collections docs(collections): add module example (#4475) 2024-03-12 16:56:07 +11:00
console deprecation(console): copy std/console APIs into std/cli and deprecate std/console (#4547) 2024-04-08 14:32:55 +10:00
crypto chore: enable verbatim-module-syntax lint rule (#4539) 2024-04-02 00:57:05 +00:00
csv chore: enable single-var-declarator lint rule (#4488) 2024-03-14 22:18:00 +11:00
data_structures docs(data_structures): add module example (#4477) 2024-03-12 16:57:03 +11:00
datetime chore(datetime): rename _common.ts to _date_time_formatter.ts (#4522) 2024-03-26 21:54:12 +11:00
dotenv chore: enable camelcase lint rule (#4440) 2024-03-05 14:57:14 +11:00
encoding deprecation(encoding): make exported function names consistent with std/encoding (#4555) 2024-04-08 15:47:35 +10:00
expect feat(expect): support expect.addSnapshotSerialize() api (#4537) 2024-04-02 19:44:40 +09:00
flags docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253) 2024-02-01 09:19:46 +11:00
fmt tests(fmt): add duration() tests (#4551) 2024-04-07 18:02:57 +10:00
front_matter chore: enable verbatim-module-syntax lint rule (#4539) 2024-04-02 00:57:05 +00:00
fs docs(fs): polish documentation (#4526) 2024-03-27 17:28:06 +11:00
html refactor(html): prepare for noUncheckedIndexedAccess (#4297) 2024-02-12 14:12:28 +11:00
http docs(http): fix default algorithm for etag in docs (#4518) 2024-03-25 17:52:22 +09:00
ini refactor: make the code work under verbatimModuleSyntax (#4406) 2024-02-27 21:57:25 +00:00
io refactor(io): format test names (#4413) 2024-03-14 17:26:48 +11:00
json refactor: make the code work under verbatimModuleSyntax (#4406) 2024-02-27 21:57:25 +00:00
jsonc docs(jsonc): add module-level docs (#4402) 2024-02-27 19:28:34 +00:00
log deprecate(log): deprecate internal utility methods (#4436) 2024-04-10 11:35:11 +10:00
media_types test(media_types): improve test coverage (#4554) 2024-04-08 15:12:32 +09:00
msgpack refactor: make the code work under verbatimModuleSyntax (#4406) 2024-02-27 21:57:25 +00:00
net refactor(using): use using keyword for Explicit Resource Management (#4143) 2024-01-15 08:35:50 +11:00
path docs(path): add more details to ParsedPath and other examples (#4489) 2024-03-16 15:32:20 +10:00
permissions docs: fix broken {@link} hyperlinks (#4241) 2024-01-26 01:08:29 +11:00
regexp docs(regexp): complete documentation (#4319) 2024-02-13 07:32:41 +11:00
semver feat(semver): greaterThanRange() and lessThanRange() (#4534) 2024-04-03 15:22:18 +09:00
streams refactor: make the code work under verbatimModuleSyntax (#4406) 2024-02-27 21:57:25 +00:00
testing feat(testing): add after, before, test aliases (#4541) 2024-04-02 12:53:27 +02:00
text refactor(text): prepare for noUncheckedIndexedAccess (#4148) 2024-01-11 07:33:57 +11:00
toml refatcor(toml): prepare for noUncheckedIndexedAccess (#4274) 2024-02-04 20:23:55 +09:00
ulid refactor: make the code work under verbatimModuleSyntax (#4406) 2024-02-27 21:57:25 +00:00
url chore: enable camelcase lint rule (#4440) 2024-03-05 14:57:14 +11:00
uuid refactor(uuid): prepare for noUncheckedIndexedAccess (#4445) 2024-03-11 08:59:30 +11:00
webgpu chore: enable simulated tests for Deno 2 (#4556) 2024-04-09 07:47:50 +10:00
yaml fix(yaml): speciously restrictive type for stringify() (#4507) 2024-03-23 13:02:44 +11:00
.editorconfig chore: fix .editorconfig syntax (#4376) 2024-02-24 09:51:17 +09:00
.gitattributes Remove std/node, it was merged into Deno itself (#3206) 2023-02-22 10:28:55 -05:00
.gitignore chore: ignore /docs folder (#4112) 2024-01-05 18:55:55 +11:00
badge.svg docs: "Built with deno_std" badge (#3797) 2023-11-24 13:54:28 +11:00
browser-compat.tsconfig.json fix: improve type safety for browser-compatible modules (#995) 2021-07-06 11:15:37 +09:00
deno.json docs(encoding): polish documentation (#4497) 2024-04-02 21:42:55 +11:00
LICENSE chore: update copyright header (#1871) 2022-02-02 23:21:39 +09:00
README.md docs: ARCHITECTURE.md (#4559) 2024-04-10 11:27:39 +10:00
Releases.md 0.221.0 (#4531) 2024-03-27 23:48:39 +00:00
version.ts 0.221.0 (#4531) 2024-03-27 23:48:39 +00:00

Deno Standard Library

codecov ci

High-quality APIs for Deno and the web. Use fearlessly.

NOTE: The standard library is also available on JSR - check out the @std scope on JSR here.

Get Started

import { copy } from "https://deno.land/std@$STD_VERSION/fs/copy.ts";

await copy("./foo", "./bar");

See here for recommended usage patterns.

Documentation

Check out the documentation here.

  1. Include the version of the library in the import specifier.

    Good:

    import { copy } from "https://deno.land/std@$STD_VERSION/fs/copy.ts";
    
  2. Only import modules that you require.

    Bad (when using only one function):

    import * as fs from "https://deno.land/std@$STD_VERSION/fs/mod.ts";
    

    Good (when using only one function):

    import { copy } from "https://deno.land/std@$STD_VERSION/fs/copy.ts";
    

    Good (when using multiple functions):

    import * as fs from "https://deno.land/std@$STD_VERSION/fs/mod.ts";
    
  3. Do not import symbols with a name prefixed by an underscore (they're not intended for public use).

    Bad:

    import { _format } from "https://deno.land/std@$STD_VERSION/path/_common/format.ts";
    
  4. Do not import modules with a directory or filename prefixed by an underscore (they're not intended for public use).

    Bad:

    import { createLPS } from "https://deno.land/std@$STD_VERSION/streams/_common.ts";
    

    Good:

    import { TextLineStream } from "https://deno.land/std@$STD_VERSION/streams/text_line_stream.ts";
    
  5. Do not import test modules or test data.

    Bad:

    import { test } from "https://deno.land/std@$STD_VERSION/front_matter/test.ts";
    

Stability

Sub-module Status
archive Unstable
assert Stable
async Stable
bytes Stable
cli Unstable
collections Stable
console Unstable
crypto Stable
csv Stable
data_structures Unstable
datetime Unstable
dotenv Unstable
encoding Stable
expect Unstable
flags Unstable
fmt Stable
front_matter Stable
fs Stable
html Unstable
http Unstable
ini Unstable
io Unstable
json Stable
jsonc Stable
log Unstable
media_types Stable
msgpack Unstable
net Unstable
path Stable
permissions Deprecated
regexp Unstable
semver Unstable
streams Stable
testing Stable
text Unstable
toml Stable
ulid Unstable
url Unstable
uuid Stable
webgpu Unstable
yaml Stable

For background and discussions regarding the stability of the following sub-modules, see #3489.

Architecture

Check out the architecture guide here.

Design

Minimal Exports

Files are structured to minimize the number of dependencies they incur and the amount of effort required to manage them, both for the maintainer and the user. In most cases, only a single function or class, alongside its related types, are exported. In other cases, functions that incur negligible dependency overhead will be grouped together in the same file.

Deprecation Policy

We deprecate the APIs in the Standard Library when they get covered by new JavaScript language APIs or new Web Standard APIs. These APIs are usually removed after 3 minor versions.

If you still need to use such APIs after the removal for some reason (for example, the usage in Fresh island), please use the URL pinned to the version where they are still available.

For example, if you want to keep using readableStreamFromIterable, which was deprecated and removed in favor of ReadableStream.from in v0.195.0, please use the import URL pinned to v0.194.0:

import { readableStreamFromIterable } from "https://deno.land/std@0.194.0/streams/readable_stream_from_iterable.ts";

Contributing

Check out the contributing guidelines here.

Releases

The Standard Library is versioned independently of the Deno CLI. This will change once the Standard Library is stabilized. See here for the compatibility of different versions of the Deno Standard Library and the Deno CLI.

A new minor version of the Standard Library is published at the same time as every new version of the Deno CLI (including patch versions).

Badge

Built with the Deno Standard Library

<a href="https://deno.land/std">
  <img
    width="135"
    height="20"
    src="https://raw.githubusercontent.com/denoland/deno_std/main/badge.svg"
    alt="Built with the Deno Standard Library"
  />
</a>
[![Built with the Deno Standard Library](https://raw.githubusercontent.com/denoland/deno_std/main/badge.svg)](https://deno.land/std)