The default handler builder for the library -- imlements the HandlerBuilder
interface for a
convenient way to create storage handlers.
Convenience wrapper around the handler builder in Handlers
and the
ValueStorageHandler.storeValue
directory storage handler method to write the contents
of an object to a directory in one step.
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.
An implementation of interface HandlerBuilder
that provides default versions of the known
value storage handlers.
Create a new directory creator that can create local directories on the current platform.
Create a new file writer appropriate for writing local files on the current platform.
The interfaces that underlie this library.
Options that apply specifically to the array to directory builder method:
HandlerBuilder.arrayToDirectory
.
The signature expected of the custom canStoreValue
implementation passed to the
HandlerBuilder.customFile
method.
Options specific to the HandlerBuilder.customFile
method.
Interface of a directory creator, that can asynchronously create a new directory.
Options passed to the DirectoryCreator
createDirectory
method.
The common options passed to the file handler builder methods on interface HandlerBuilder
.
Interface of a writer that can write text files from strings and Uint8Array
s to the file system.
Extension of the value storage handler with a fluent API for convenience.
A fluent builder interface for creating value storage handlers handlers.
Options that apply to the directory-related builder methods: HandlerBuilder.arrayToDirectory
and
HandlerBuilder.objectToDirectory
.
The signature expected of serializer functions passed to the HandlerBuilder.customFile
method.
Interface implemented by objects that can store values to files or directories.
Options passed to the ValueStorageHandler storeValueToFile
method.
Our own equivalent to the Node.js Abortable
interface. Unfortunately, the Deno and Node.js
AbortSignal
types aren't completely identical, so using Abortable
directly causes
type checking issues.
Some utility functions useful in advanced library usage scenarios.
Perform the reverse of encodePathElement
: decode a path element back to its original form.
Encode a path element so that it does not contain any forward slashes (and can be decoded). This is a tiny subset of URI element encoding.
Given an object implementing interface ValueStorageHandler
, wrap it in a FluentHandler
implementation that makes it easier to build customized versions of the handler. The handler is only wrapped if it
is not already a fluent handler.