JSPM

@kp-mods/fs.macchiato

3.0.1-alpha.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 133
  • Score
    100M100P100Q28266F
  • License MIT

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

Package Exports

  • @kp-mods/fs.macchiato
  • @kp-mods/fs.macchiato/out/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kp-mods/fs.macchiato) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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.