Skip to content

@duplojs/server-utils is typed as a runtime-independent server helper. It is part of the DuploJS ecosystem.

Notifications You must be signed in to change notification settings

duplojs/server-utils

Repository files navigation

@duplojs/server-utils

NPM version

Typed, runtime-agnostic server helpers for file systems, paths, and common system operations in the DuploJS ecosystem.

Documentation

Why

  • Consistent APIs across Node.js, Deno, and Bun
  • Explicit result types (Ok/Success/Left) for clear error handling
  • Small, focused utilities you can import individually

Install

npm install @duplojs/server-utils @duplojs/utils

Quick start

import { SF } from "@duplojs/server-utils";
import { E, unwrap } from "@duplojs/utils";

const result = await SF.readTextFile("/tmp/example.txt");

if (E.isRight(result)) {
  const content = unwrap(result);
  // content: string
}

What’s inside

  • File system utilities: read/write/append, directories, links, copy/move/remove
  • JSON helpers
  • Temporary files and directories
  • MIME type helpers and file/folder interfaces

About

@duplojs/server-utils is typed as a runtime-independent server helper. It is part of the DuploJS ecosystem.

Topics

Resources

Contributing

Stars

Watchers

Forks