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

x/ayonli_jsext/esm/cli.js

A JavaScript extension package for building strong and modern applications.
Latest
import * as ayonliJsext from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/cli.js";

Variables

The command-line arguments passed to the program.

v
isTsRuntime
deprecated

Whether the standard IO is a text terminal.

v
platform
deprecated

Functions

Returns the width of a single character.

Opens the given file in a text editor.

Returns the current size of the application window.

Returns true if the given data is a typing input. That is, it is not a control key, navigation key, or function key.

Checks if the program is running in Windows Subsystem for Linux.

Requests the standard input to be used only by the given task until it is completed.

Moves the cursor to the left base on the width of the given string.

Moves the cursor to the right base on the width of the given string.

Parses the given CLI arguments into an object.

Executes the script inside PowerShell as if they were typed at the PowerShell command prompt.

Quotes a string to be used as a single argument to a shell command.

Reads a chunk of data from the standard input. This could be a single key stroke, or a multi-byte sequence for input from an IME.

Executes a command in the terminal and returns the exit code and outputs.

Returns the width of a string.

Executes a command with elevated privileges using sudo (or UAC in Windows).

Returns the path of the given command if it exists in the system, otherwise returns null.

Writes a chunk of data to the standard output.

Writes a chunk of data to the standard output synchronously.