Options
All
  • Public
  • Public/Protected
  • All
Menu

Project parrier

-----------------------------------------------------

Welcome to parrier

GitHub package.json version Prerequisite Prerequisite Documentation Maintenance License: MIT

Actions Status

This is a package that lists everything inside the provided "path" (or the full tree structure if "recurse" is set), asynchronously.

Gif showing software working

Try on repl.it

-----------------------------------------------------

Table of Contents

-----------------------------------------------------

Prerequisites

  • node: >=8.0.0
  • npm: >=5.0.0

-----------------------------------------------------

Install

npm install parrier

-----------------------------------------------------

Usage

Async / await example

/**
 * Async / await
 */

const parrier = require('parrier');
// import parrier from 'parrier'; // for typescript

const path = './example-folder/';

(() => {
  try {
    async () => {
      const folderContent = await parrier(path);
      console.log(folderContent); // logs an array of IFile

      // IFile is a typescript interface (of this package)
      // that represents the file object (including
      // file.name, file.extension, file.isFile, etc...)
      // refer to API to know more
    };
  } catch (err) {
    console.log(err.message);
  }
})();

Promise example

/**
 * Promise
 */

const parrier = require('parrier');
// import parrier from 'parrier'; // for typescript

const path = './example-folder/';

parrier(path)
  .then((folderContent) => console.log(folderContent))
  .catch((err) => console.log(err.message));

-----------------------------------------------------

API

Follow this link to check the API

-----------------------------------------------------

Changelog

Follow this link to check the Changelog

-----------------------------------------------------

Author

jruipinto

-----------------------------------------------------

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page. You can also take a look at the contributing guide.

-----------------------------------------------------

References

-----------------------------------------------------

Show your support

Give a ⭐️ if this project helped you!

-----------------------------------------------------

License

Copyright © 2021 jruipinto.

This project is MIT licensed.

Generated using TypeDoc