Code Monkey home page Code Monkey logo

deno_std's Introduction

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.

Recommended Usage

  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/[email protected]/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)

deno_std's People

Contributors

iuioiua avatar kt3k avatar bartlomieju avatar ry avatar timreichen avatar caspervonb avatar denobot avatar nayeemrmn avatar kitsonk avatar lino-levan avatar uki00a avatar zekth avatar ayame113 avatar getspooky avatar axetroy avatar marcosc90 avatar dsherret avatar cknight avatar lucacasonato avatar keroxp avatar zhmushan avatar jsejcksn avatar cjihrig avatar soremwar avatar syhol avatar crowlkats avatar babiabeo avatar majidsajadi avatar kevinkassimo avatar polaretech avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.