@kp-mods/fs.macchiato
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-alpha.0 • Public • Published

@kp-mods/fs.macchiato

A set of classes for easy testing of built-in structures of FS.

Install

$ npm install @kp-mods/fs.macchiato

Usage

import { Stats, StatsMode, Dirent, DirentType } from '@kp-mods/fs.macchiato';

const stats = new Stats({ mode: StatsMode.File });
const dirent = new Dirent('file.txt', DirentType.File);

API

Stats

Creates a fake instance of fs.Stats. Can accept options to control parameter values.

const stats = new Stats({
	mode: StatsMode.File,
	ino: 3
});

Dirent

Creates a fake instance of fs.Dirent. Can accept options to control parameter values.

const dirent = new Dirent('file.txt', DirentType.Link);

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.

Package Sidebar

Install

npm i @kp-mods/fs.macchiato

Weekly Downloads

2

Version

3.0.0-alpha.0

License

MIT

Unpacked Size

6.42 kB

Total Files

10

Last publish

Collaborators

  • madtisa