Skip to main content

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
4 months ago (0.1.4)

The functions in this module are the lower-level implementation details of the public API. They allow advanced consumers to control precisely how the library interacts with the file system or provide their own file system-like implementations.

The newFileWriter function is a platform-neutral way of creating the file writing abstraction used throughout this library.

The newDirectoryCreator function is a platform-neutral way of creating the directory creation abstraction used throughout this library.

The DefaultHandlerBuilder is the default implementation of the HandlerBuilder interface. It is initialized with FileWriter and DirectoryCreator implementations. It is used to build all the handlers known to the library in a fluent way.

Classes

c
DefaultHandlerBuilder

An implementation of interface HandlerBuilder that provides default versions of the known value storage handlers.

Functions

f
newDirectoryCreator

Create a new directory creator that can create local directories on the current platform.

f
newFileWriter

Create a new file writer appropriate for writing local files on the current platform.

Add Package

deno add jsr:@scroogieboy/object-to-directory

Import symbol

import * as mod from "@scroogieboy/object-to-directory/factories";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@scroogieboy/object-to-directory/factories";

Add Package

npx jsr add @scroogieboy/object-to-directory

Import symbol

import * as mod from "@scroogieboy/object-to-directory/factories";

Add Package

yarn dlx jsr add @scroogieboy/object-to-directory

Import symbol

import * as mod from "@scroogieboy/object-to-directory/factories";

Add Package

pnpm dlx jsr add @scroogieboy/object-to-directory

Import symbol

import * as mod from "@scroogieboy/object-to-directory/factories";

Add Package

bunx jsr add @scroogieboy/object-to-directory

Import symbol

import * as mod from "@scroogieboy/object-to-directory/factories";