0.0.9 • Published 3 years ago

@mists/temp v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

@mists/temp

Npm Version Npm Downloads Contributors Contributions welcome

TravisCI

Sonarcloud Status SonarCloud Coverage SonarCloud Bugs SonarCloud Vulnerabilities

@mists/temp is a partial transpile of the GoLang os module, and can be used for generating temporary test files, directories or both.

Getting Started

Installation

Use npm (or any other package manager) do add this module to your project.

npm i -D @mists/temp

Code

import {FileHandle, tempDir, tempDirWithFiles, tempFile, tempFileOfSize} from '@mists/tempjs';

const dirPath = tempDir({
  // ...
}); // will create a temporary folder

const [dirPath, dirs, files] = tempDirWithFiles({
  // ...
}); // will create a temporary directory, with multiple subfolerds and files

const fh = tempFile({
  // ...
}); // will create a temporary file

const fh = tempFileOfSize({
  // ...
  size: '20Mb'
}); // will create a temporary file of 20Mb

Documentation

See API documentation here.

Development

If you have access to the project clone it, otherwise fork it and clone it:

git clone https://github.com/mists-aside/tempjs
# create a new branch if necesary
git create -b new_feature

Code ;)

Requirements

Testing

Just run npm run test.

If you wish to run a single test file, use npm run test:single -- test/file.test.ts

No need to compile tests, mocha is configured to run TypeScript.

Deployment

NPM publishing is done will be done automatically, through .travis.yaml. Please do not attempt to change the publishig routine.

Authors

  • Dragos Cirjan - Initial work - e3683b43282ee4b9d97cd941f2526135b8691d04

See also the list of contributors who participated in this project.

Issues / Support

Add a set of links to the issues page/website, so people can know where to add issues/bugs or ask for support.

0.0.9

3 years ago

0.0.9-beta.0

3 years ago

0.0.8

3 years ago

0.0.8-beta.0

3 years ago

0.0.7

3 years ago

0.0.6-dev.1

3 years ago

0.0.6

3 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago