標準函式庫
Deno 提供一組由核心團隊稽核且保證與 Deno 協同運作的標準模組。
標準函式庫可於下列位置取得:https://deno.land/std
版本控管和穩定性
標準函式庫尚未穩定,因此其版本控管方式與 Deno 不同。有關最新版本,請參閱 https://deno.land/std 或 https://deno.land/std/version.ts。標準函式庫會在每次 Deno 發布時發布。
我們強烈建議始終使用固定標準函式庫版本的匯入,以避免意外變更。例如,不要連結到可能會隨時變更的預設程式碼分支,因為這可能會導致編譯錯誤或意外行為
// import the latest release, this should be avoided
import { copy } from "https://deno.land/std/fs/copy.ts";
請改用不會變更且不可變更的 std 函式庫版本
// imports from v0.220.0 of std, never changes
import { copy } from "https://deno.land/std@0.220.0/fs/copy.ts";