Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dtils/mod.unstable.ts>readText

The best unofficial library of utilities for Deno applications
Go to Latest
function readText
Re-export
import { readText } from "https://deno.land/x/dtils@2.3.1/mod.unstable.ts";

Read a file as a string. Returns an empty string if the file doesn't exist.

NOTICE: At the next major release, this will return string|null

Parameters

file: string

Returns

Promise<string>