Skip to main content
Home

Built and signed on GitHub Actions

Library to write out the contents of a JavaScript object structure to the file system in a granular directory structure.

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
5 months ago (0.1.4)
interface FileWriter

Interface of a writer that can write text files from strings and Uint8Arrays to the file system.

Properties

readonly
name: string

The name of the writer. For runtime debugging purposes.

Methods

writeTextToFile(
path: URL,
contents: string,
options?: Readonly<WriteTextToFileOptions>,
): Promise<void>

Asynchronously write the contents to a file identified by its URL into a string.

writeBinaryToFile(
path: URL,
contents: Readonly<Uint8Array>,
options?: Readonly<WriteTextToFileOptions>,
): Promise<void>

Asynchronously write the contents to a file identified by its URL into a Uint8Array.

New Ticket: 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:@scroogieboy/object-to-directory

Import symbol

import { type FileWriter } from "@scroogieboy/object-to-directory/interfaces";
or

Import directly with a jsr specifier

import { type FileWriter } from "jsr:@scroogieboy/object-to-directory/interfaces";

Add Package

pnpm i jsr:@scroogieboy/object-to-directory
or (using pnpm 10.8 or older)
pnpm dlx jsr add @scroogieboy/object-to-directory

Import symbol

import { type FileWriter } from "@scroogieboy/object-to-directory/interfaces";

Add Package

yarn add jsr:@scroogieboy/object-to-directory
or (using Yarn 4.8 or older)
yarn dlx jsr add @scroogieboy/object-to-directory

Import symbol

import { type FileWriter } from "@scroogieboy/object-to-directory/interfaces";

Add Package

npx jsr add @scroogieboy/object-to-directory

Import symbol

import { type FileWriter } from "@scroogieboy/object-to-directory/interfaces";

Add Package

bunx jsr add @scroogieboy/object-to-directory

Import symbol

import { type FileWriter } from "@scroogieboy/object-to-directory/interfaces";