mktemp

  • Version 1.0.1
  • Published
  • 19.8 kB
  • No dependencies
  • MIT license

Install

npm i mktemp
yarn add mktemp
pnpm add mktemp

Overview

mktemp command for node.js

Index

Functions

function createDir

createDir: (
template: string,
callback?: (err: NodeJS.ErrnoException | null, dirname: string | null) => void
) => undefined | Promise<string | null>;
  • create unique name directory

    Parameter template

    template string for file directory

    Parameter callback

    {Promise}

function createDirSync

createDirSync: (template: string) => string;
  • sync version createDir

    Parameter template

    template string for directory name

    Throws

    {Error} if caught error {string} dirname

function createFile

createFile: (
template: string,
callback?: (err: NodeJS.ErrnoException | null, filename: string | null) => void
) => undefined | Promise<string | null>;
  • create unique name file

    Parameter template

    template string for file name

    Parameter callback

    {Promise}

function createFileSync

createFileSync: (template: string) => string;
  • sync version createFile

    Parameter template

    template string for file name

    Throws

    {Error} if caught error {string} filename

Package Files (3)

Dependencies (0)

No dependencies.

Dev Dependencies (20)

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/mktemp.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/mktemp)
  • HTML
    <a href="https://www.jsdocs.io/package/mktemp"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>