Skip to content

Getting Started ​

nsuite exposes its public helpers from one package entry. Import only the utilities required by your script or service.

Install ​

bash
npm install nsuite

The package supports Node.js 18 and later and ships TypeScript declarations.

Import helpers ​

ts
import { getDirname, getFilePath, writeFileSafely } from "nsuite";

const filePath = getFilePath(import.meta.url);
const directory = getDirname(import.meta.url);

await writeFileSafely(`${directory}/output.txt`, "Generated by nsuite.", {
  encoding: "utf8",
});

Select the right guide ​

Released under the Apache-2.0 License.