fixturify

  • Version 2.1.1
  • Published
  • 11.9 kB
  • 6 dependencies
  • MIT license

Install

npm i fixturify
yarn add fixturify
pnpm add fixturify

Overview

Convert objects into directory structures and back again

Index

Functions

function readSync

readSync: (dir: string, options?: Options, _relativeRoot?: string) => DirJSON;

    function writeSync

    writeSync: (dir: string, obj: DirJSON) => void;

      Interfaces

      interface DirJSON

      interface DirJSON {}
      • A recursive JSON representation of a directory. This representation includes both files, their contents and directories which can contain both files and directories.

        ```ts const files : DirJSON = { 'index.js': 'content', 'foo.txt': 'content', 'folder': { 'index.js': 'content', 'apple.js': 'content', 'other-folder': { } }, } ```

      index signature

      [filename: string]: DirJSON | string | null;

        interface Options

        interface Options {}

          property directories

          directories?: boolean;

            property exclude

            exclude?: (IMinimatch | string)[];

              property globs

              globs?: (string | IMinimatch)[];

                property ignore

                ignore?: (string | IMinimatch)[];

                  property ignoreEmptyDirs

                  ignoreEmptyDirs?: boolean;

                    property include

                    include?: (IMinimatch | string)[];

                      Package Files (1)

                      Dependencies (6)

                      Dev Dependencies (4)

                      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/fixturify.

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