The Deno Standard Library
Go to file
Asher Gomez 3736b01a7d
docs(jsonc): add module-level docs (#4402)
* docs(jsonc): add module-level docs

* Yoshiya's suggestion
2024-02-27 19:28:34 +00:00
_tools build: update _ to - in workspace converter script (#4357) 2024-02-21 13:43:55 +01:00
.devcontainer chore: add development container configuration (#1938) 2022-02-21 14:23:43 +11:00
.github chore: use 'release' event for triggering jsr publish (#4370) 2024-02-22 16:11:40 +09:00
archive refactor: cleanup deprecated-related APIs in std/io and std/streams (#4201) 2024-01-15 13:23:04 +09:00
assert docs: link to assertThrows() and assertRejects() (#4395) 2024-02-26 18:58:17 +00:00
async docs(async): use Array.fromAsync() in debounce() example (#4283) 2024-02-07 16:04:31 +11:00
bytes refactor(bytes): prepare for noUncheckedIndexedAccess (#4119) 2024-01-06 08:37:29 +11:00
cli refactor(cli): cleanup parse_args.ts (#4189) 2024-02-12 10:15:51 +11:00
collections feat(collections): add pick and omit (#4218) 2024-02-25 20:51:37 +09:00
console refactor(console): prepare for noUncheckedIndexedAccess (#4269) 2024-02-02 16:42:48 +09:00
crypto chore(crypto): move test scripts to own files (#4367) 2024-02-22 15:39:35 +11:00
csv docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253) 2024-02-01 09:19:46 +11:00
data_structures refactor(data_structures): prepare for noUncheckedIndexedAccess (#4146) 2024-01-10 20:18:34 +00:00
datetime feat(datetime): format() options (#4285) 2024-02-09 19:35:14 +09:00
dotenv refactcor(dotenv): prepare for noUncheckedIndexedAccess (#4261) 2024-02-02 08:34:42 +11:00
encoding refactor(encoding): prepare for noUncheckedIndexedAccess (#4275) 2024-02-25 07:24:08 +11:00
expect refactor(expect): format test names (#4287) 2024-02-09 09:00:55 +11:00
flags docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253) 2024-02-01 09:19:46 +11:00
fmt docs(fmt/colors): warn that dim is incompatible accross terminals (#4303) 2024-02-12 12:15:58 +11:00
front_matter chore(front_matter): format test names (#4399) 2024-02-27 08:35:41 +00:00
fs refactor(fs): prepare for noUncheckedIndexedAccess (#4277) 2024-02-07 11:08:47 +11:00
html refactor(html): prepare for noUncheckedIndexedAccess (#4297) 2024-02-12 14:12:28 +11:00
http chore(http): fix spawned tests after migration script (#4368) 2024-02-22 15:40:55 +11:00
ini refactor(ini): prepare for noUncheckedIndexedAccess (#4335) 2024-02-16 08:09:51 +11:00
io feat(io): iterateReader[Sync]() (#4247) 2024-02-19 19:24:22 +09:00
json docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253) 2024-02-01 09:19:46 +11:00
jsonc docs(jsonc): add module-level docs (#4402) 2024-02-27 19:28:34 +00:00
log fix(log): add missing return types (#4401) 2024-02-28 05:44:33 +11:00
media_types chore(media_types): format test names (#4380) 2024-02-25 22:25:12 +00:00
msgpack chore(msgpack): format test names (#4381) 2024-02-25 09:00:35 +11:00
net refactor(using): use using keyword for Explicit Resource Management (#4143) 2024-01-15 08:35:50 +11:00
path refactor(path): prepare for noUncheckedIndexedAccess (#4356) 2024-02-21 08:01:07 +11: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 chore(semver): remove legacy Range.ranges object definition (#4374) 2024-02-23 20:35:19 +11:00
streams refactor(streams): prepare for noUncheckedIndexedAccess (#4377) 2024-02-25 07:22:50 +11:00
testing feat(testing): explicit resource management for spy() and stub() (#4306) 2024-02-16 15:26:33 +11: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 docs: fix broken {@link} hyperlinks (#4241) 2024-01-26 01:08:29 +11:00
url refactor(url): prepare for noUncheckedIndexedAccess (#4145) 2024-01-11 06:59:09 +11:00
uuid chore: update copyright year (#4046) 2024-01-02 08:11:32 +11:00
webgpu docs: fix broken {@link} hyperlinks (#4241) 2024-01-26 01:08:29 +11:00
yaml docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253) 2024-02-01 09:19:46 +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 chore(internal): remove warnOnDeprecatedApi() and internal folder (#4359) 2024-02-20 20:00:58 +11:00
LICENSE chore: update copyright header (#1871) 2022-02-02 23:21:39 +09:00
README.md docs: ignore bad snippet examples (#4388) 2024-02-26 19:46:10 +11:00
Releases.md 0.217.0 (#4369) 2024-02-22 01:57:01 +01:00
version.ts 0.217.0 (#4369) 2024-02-22 01:57:01 +01:00

Deno Standard Library

codecov ci

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

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.

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)