Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dax/mod.ts>CommandBuilder#text

Cross-platform shell tools for Deno and Node.js inspired by zx.
Very Popular
Latest
method CommandBuilder.prototype.text
Re-export
import { CommandBuilder } from "https://deno.land/x/dax@0.39.2/mod.ts";

Sets stdout as quiet, spawns the command, and gets stdout as a string without the last newline.

Shorthand for:

const data = (await $`command`.quiet("stdout")).stdout.replace(/\r?\n$/, "");

Returns

Promise<string>