Skip to content

Common

Cross-cutting helpers with no specific business use case. This namespace groups generic building blocks.

How to import?

All functions are exported from the main entry or via direct import (tree-shaking friendly).

typescript
import { getCurrentWorkDirectory } from "@duplojs/server-utils";
import { DServerCommon, SC } from "@duplojs/server-utils";
import * as DServerCommon from "@duplojs/server-utils/common";
import * as SC from "@duplojs/server-utils/common";

Current directory

getCurrentWorkDirectory

returns the current working directory for the active runtime.

setCurrentWorkingDirectory

changes the current working directory from a path or URL.

Released under the MIT license.