The Deno Standard Library
Go to file
Simon Holloway f712403cb1
feat(testing): enable the using keyword on FakeTime() (#3961)
* feat(testing): enable the "using" keyword on FakeTime

* chore(testing): update all tests with using FakeTime

* chore(testing): formatting fix
2023-12-15 07:47:50 +11:00
_tools fix(tools): ignore the .git folder when checking for copyright header (#3937) 2023-12-12 10:37:09 +00:00
.devcontainer chore: add development container configuration (#1938) 2022-02-21 14:23:43 +11:00
.github docs: add test name convention (#3959) 2023-12-14 14:39:22 +11:00
archive deprecation: move types.d.ts to std/io (#3885) 2023-12-01 11:46:43 +09:00
assert feat(expect): support message checks in expect().toThrow (#3938) 2023-12-12 23:45:58 +09:00
async feat(testing): enable the using keyword on FakeTime() (#3961) 2023-12-15 07:47:50 +11:00
bytes BREAKING(bytes): remove spread concat() overload (#3854) 2023-11-24 19:19:11 +11:00
cli fix(cli): re-export promptSecret from mod.ts (#3944) 2023-12-13 12:30:00 +09:00
collections chore(collections): complete documentation (#3896) 2023-12-05 19:53:55 +11:00
console chore(console): complete documentation (#3901) 2023-12-06 18:16:11 +11:00
crypto docs(crypto): complete documentation (#3921) 2023-12-14 20:55:43 +11:00
csv chore(csv): use TextDecoderStream() in test (#3801) 2023-11-17 20:05:06 +11:00
data_structures feat: std/data_structures (#3734) 2023-11-15 21:17:44 +11:00
datetime feat(testing): enable the using keyword on FakeTime() (#3961) 2023-12-15 07:47:50 +11:00
dotenv refactor(dotenv): move parse() to own file (#3873) 2023-11-29 04:42:14 +00:00
encoding BREAKING(encoding): remove deprecated APIs (#3952) 2023-12-14 12:23:10 +09:00
expect feat(expect): support message checks in expect().toThrow (#3938) 2023-12-12 23:45:58 +09:00
flags BREAKING: move std/flags to new std/cli sub-module (#3530) 2023-11-16 11:08:51 +09:00
fmt chore(fmt): replace stripColor() use with stripAnsiCode() (#3902) 2023-12-06 17:58:42 +11:00
front_matter chore(front_matter): cleanup deprecation-related code (#3932) 2023-12-12 14:51:35 +11:00
fs refactor(fs): trim internal dependencies (#3916) 2023-12-10 05:16:47 +11:00
html BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00
http feat(testing): enable the using keyword on FakeTime() (#3961) 2023-12-15 07:47:50 +11:00
ini feat: add std/ini (#3871) 2023-12-04 13:43:26 +09:00
io deprecation(io): IO types in favour of Web Streams API (#3903) 2023-12-06 17:32:54 +11:00
json chore: use Array.fromAsync() where possible (#3788) 2023-11-11 06:00:28 +11:00
jsonc chore(jsonc): rename testdata file (#3883) 2023-12-01 01:00:38 +01:00
log deprecation: move types.d.ts to std/io (#3885) 2023-12-01 11:46:43 +09:00
media_types Revert "BREAKING(media_types): remove typeByExtension()" (#3877) 2023-11-29 20:00:04 +11:00
msgpack fix(msgpack): encode huge objects (#3698) 2023-11-08 17:30:22 +09:00
net feat(net): getAvailablePort() (#3890) 2023-12-04 13:50:40 +09:00
path chore(fs): complete documentation (#3897) 2023-12-05 19:52:56 +11:00
permissions docs: improve deprecation notices (#3804) 2023-11-16 05:33:11 +11:00
regexp BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00
semver deprecation(semver): deprecate rcompare() (#3958) 2023-12-14 14:38:57 +11:00
signal docs: improve deprecation notices (#3804) 2023-11-16 05:33:11 +11:00
streams perf(streams): make toBlob() 20-30% faster (#3934) 2023-12-14 14:12:10 +11:00
testing feat(testing): enable the using keyword on FakeTime() (#3961) 2023-12-15 07:47:50 +11:00
text fix(text): fix closestString (#3936) 2023-12-12 19:34:42 +09:00
toml fix(toml): handle CRLF as newline in parsing multiline string (#3920) 2023-12-12 11:41:28 +11:00
ulid feat(testing): enable the using keyword on FakeTime() (#3961) 2023-12-15 07:47:50 +11:00
url BREAKING(path): split path into per-os modules, deprecate legacy os-specific exports (#3649) 2023-09-28 19:54:53 +09:00
uuid BREAKING(bytes): deprecate concat() signatures that don't use Uint8Array[] argument (#3784) 2023-11-13 16:34:32 +11:00
webgpu feat: new std/webgpu sub-module (#3119) 2023-12-12 15:33:07 +11:00
yaml refactor: remove top-level arrow sytnax use (#3687) 2023-10-11 16:19:48 +09:00
.editorconfig chore(node): add asn1.js (#1971) 2022-02-28 20:55:56 +09:00
.gitattributes Remove std/node, it was merged into Deno itself (#3206) 2023-02-22 10:28:55 -05:00
.gitignore chore(http): add test for file containing space in name (#3892) 2023-12-04 17:00:44 +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(deps): bump the dependencies group in /crypto/_wasm with 6 updates (#3866) 2023-11-29 11:42:00 +11:00
LICENSE chore: update copyright header (#1871) 2022-02-02 23:21:39 +09:00
README.md docs: update versions.json URL in README.md (#3945) 2023-12-14 17:41:16 +11:00
Releases.md 0.209.0 (#3949) 2023-12-13 12:11:18 -07:00
types.d.ts deprecation(io): IO types in favour of Web Streams API (#3903) 2023-12-06 17:32:54 +11:00
version.ts 0.209.0 (#3949) 2023-12-13 12:11:18 -07: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 an underscore in the name.

    Bad:

    import { _format } from "https://deno.land/std@$STD_VERSION/path/_common/format.ts";
    
  4. Do not import modules with an underscore in the path.

    Bad:

    import { filterInPlace } from "https://deno.land/std@$STD_VERSION/collections/_utils.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
collections Stable
console Unstable
csv Stable
datetime Unstable
dotenv Unstable
encoding Unstable
flags Unstable
fmt Stable
front_matter Unstable
fs Stable
html Unstable
http Unstable
io Deprecated
json Stable
jsonc Stable
log Unstable
media_types Stable
msgpack Unstable
path Unstable
permissions Deprecated
regexp Unstable
semver Unstable
signal Deprecated
streams Unstable
testing Stable
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.

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 fmhere 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)