Deno cheat sheet v1.40

πŸ§ͺ Testing

deno test [paths...]
Deno.test()

πŸ’… Formatter

deno fmt [files...]

πŸ” Linter

deno lint [files...]
All rules

βš™οΈ Tasks

deno task <task> [args...]

πŸ“ˆ Benchmarking

deno bench [files...]
Deno.bench()

πŸ‘“ Dependency inspector

deno info [url]

πŸ“„ Documentation

deno doc [url]

πŸ“¦ Compiling executables

deno compile [url]

πŸ›Ž REPL

deno repl

πŸ“Œ Script installer

deno install [url]

🧳 Vendoring

deno vendor <specifiers...>

πŸ”­ Jupyter   unstable

deno jupyter

πŸš€ Init

deno init

Deno runtime API

File System

Tools

Resources

FFI (Foreign Function Interface)

KV

Errors

Subprocesses

Runtime utils

Network

Web APIs

Window

Async

Fetch & URLs

Websocket

EventSource

Web Workers

Message

Performance

Temporal

Storage

File

TextEncoder

Streams

Compression Streams

Cache

Events

Errors

AbortController

CryptoKey

Binary to ASCII

Broadcast Channel

Structured Clone

Image Data

WebAssembly

WebGPU

Standard library

Archive/Tar

Provides a Tar and Untar classes for compressing and decompressing arbitrary data.

Async

Provide help with asynchronous tasks like delays, debouncing, deferring, or pooling.

Bytes

Provides helper functions to manipulate Uint8Array byte slices that are not included on the Uint8Array prototype.

CLI

Tools for creating interactive command line tools.

Collections

Functions for specific common tasks around collection types like Array and Record.

Crypto

Extensions to the Web Crypto supporting additional encryption APIs.

CSV   Browser

Encode and decode for CSV.

Datetime   Browser

Utilities for dealing with Date objects.

Data structures

This module exports classes that implements data structure algorithms.

Dotenv

Load environment variables from .env files.

Encoding/ascii85   Browser

Encode and decode for Ascii85/base85 encoding.

Encoding/base32   Browser

Encode and decode for base32 encoding.

Encoding/base58   Browser

Encode and decode for base58 encoding.

Encoding/base64   Browser

Encode and decode for base64 encoding.

Encoding/base64 (URL safe)   Browser

Encode and decode for base64 URL safe encoding.

Encoding/binary

Functions for encoding binary data in array buffers.

Encoding/hex   Browser

Port of the Go encoding/hex library.

Encoding/varint

Functions for encoding typed integers in array buffers.

Expect

This module provides jest compatible expect assertion functionality.

Flags   Browser

Command line arguments parser based on minimist.

Fmt/bytes   Browser

Pretty print bytes.

Fmt/colors   Browser

String formatters and utilities for dealing with ANSI color codes.

Fmt/printf

Sprintf and printf for printing formatted strings to stdout.

Front matter   Browser

Extract front matter from strings.

FS

Helpers for working with the filesystem.

HTML/Entities

Functions for HTML tasks such as escaping or unescaping HTML entities.

HTTP

Provides user-friendly serve on top of Deno's native HTTP server and other utilities for creating HTTP servers and clients.

Ini

parse and stringify for handling INI encoded data, such as the Desktop Entry specification.

JSON

Functions for parsing and stringify JSON data.

JSONC

Function for parsing JSONC (JSON with comments) strings.

Log

Logging library with the support for terminal and file outputs. Also provides interfaces for building custom loggers.

Media types

Utility functions for media types (MIME types).

Net

Network utilities.

Path   Browser

Utilities for working with OS-specific file paths.

Permissions

Helpers for interacting with Deno's permissions system.

Semver   Browser

The semantic version parser. Adapted directly from semver.

Signal

Higher level API for dealing with OS signals.

Streams

Utilities for working with the Streams API. Includes buffering and conversion.

Testing/asserts   Browser

A library of assertion functions.

Testing/bdd

A BDD interface to Deno.test() API.

Testing/mock   Browser

A mocking and spying library.

Testing/snapshot

A snapshotting library.

Testing/time   Browser

Utilities for mocking time while testing.

Text

This module exports utility functions for comparing/sorting/choosing texts with certain criteria.

TOML   Browser

Parse and stringify functions for handling TOML encoded data.

ULID   Browser

Utilities for generating ULID and decoding the timestamp from the given ULID.

URL   Browser

Utilities for working with URL paths.

UUID   Browser

Generators and validators for UUIDs for versions v1, v4 and v5.

YAML   Browser

Parse and stringify for handling YAML encoded data.

Web GPU

Utilities for interacting with the WebGPU API.