Skip to main content
Works with
This package works with Deno
This package works with Deno
JSR Score88%
License
MIT
Downloads4/wk
Published3 weeks ago (0.5.3)

🧰 Miscellaneous utilities for TypeScript projects.

download-lambda-chromium

Functions

f
chromium(unnamed 0?: ChromiumOptions): Promise<string>

Download Chromium binary for AWS Lambda environment.

Type Aliases

T
ChromiumOptions = { version?: string; path?: string; arch?: Deno.build.arch; url?: string; force?: boolean; env?: boolean; debug?: boolean; }

Chromium download options.

  • arch: Deno.build.arch

    System architecture. Default is current architecture.

  • debug: boolean

    Enable debugging.

  • env: boolean

    Set environment variables for FONTCONFIG_PATH and LD_LIBRARY_PATH (requires --allow-env). Default is true.

  • force: boolean

    Force download even if file exists.

  • path: string

    Path to save Chromium binary. Default is /tmp/chromium.

  • url: string

    Download URL.

  • version: string

    Chromium version. Default is 141.0.0.

env

Functions

f
env(
key: string,
unnamed 1?
)
2 overloads

Reads an environment variable.

filesystem

Functions

f
chdir(path: string | URL): string

Changes the current working directory.

f
cwd(): string

Gets the current working directory.

f
filetype(path: string): Nullable<"file" | "directory">

Gets the file type of a file path.

f
list(
glob: string,
unnamed 1?: ListOptions
): Promise<string[]>

Lists all files matching the given glob pattern in the specified root directory.

Type Aliases

T
ListOptions = { root?: string; relative?: boolean; files?: boolean; directories?: boolean; }

Options for list().

  • directories: boolean

    Whether to include directories in the results.

  • files: boolean

    Whether to include files in the results.

  • relative: boolean

    Whether to return relative paths.

  • root: string

    Root directory to search in. Defaults to the current working directory.

noop

Functions

f
noop(): void

No operation.

promises

Functions

f
state(promise: Promise<unknown>): Promise<"pending" | "fulfilled" | "rejected">

Returns the current state of a promise.

resolve

Functions

f
resolve(
specifier: string,
unnamed 1?: ResolveOptions
): string

Resolve a module specifier in a similar way to import.meta.resolve.

Type Aliases

T
ResolveOptions = { base?: string | ImportMeta; entrypoint?: string; }

Options for resolve

  • base: string | ImportMeta

    Base URL (defaults to current working directory).

  • entrypoint: string

    Entrypoint (defaults to "mod.ts").

timezone

Variables

v
timezone: string

Current timezone in the runtime.

v
timezones: string[]

Supported timezones in the current runtime.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@libs/toolbox

Import symbol

import * as toolbox from "@libs/toolbox";
or

Import directly with a jsr specifier

import * as toolbox from "jsr:@libs/toolbox";