Giter Club home page Giter Club logo

fs's Introduction



Fs

Extended drop-in fs replacement for Node.js


Installation · Docs · Usage



Latest Version Monthly downloads

Follow @marcuspoehls and @superchargejs for updates!


Introduction

The @supercharge/fs package provides an improved and extended fs implementation

  • provides convenience methods like isFile(path) or isDirectory(path)
  • useful methods, like copy, ensureFile, ensureDir
  • based on fs-extra providing all native fs methods from Node.js
  • full async/await support
  • aligned camelCase method naming, like realPath instead of realpath

Installation

npm i @supercharge/fs

Resources

Quick Usage Overview

Using @supercharge/fs is pretty straightforward. Install and import the package in your project and use the methods to interact with the filesystem.

For example, you may copy or move a file from src to dest or retrieve a file’s size:

const Fs = require('@supercharge/fs')

await Fs.copy(src, dest)
await Fs.move(src, dest)

const size = await Fs.size(file)
// 3758 bytes

Have a look at the docs for this package to find more details on all supported methods.

Contributing

Do you miss a string function? We very much appreciate your contribution! Please send in a pull request 😊

  1. Create a fork
  2. Create your feature branch: git checkout -b my-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request 🚀

License

MIT © Supercharge


superchargejs.com  ·  GitHub @supercharge  ·  Twitter @superchargejs

fs's People

Contributors

dependabot-preview[bot] avatar lakeshadow0 avatar marcuspoehls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fs's Issues

Imported types issue

Importing this package appears to have a problem in Typescript related to references for fs-extra types, which are not installed with the package.

declare const _default: typeof Fs & { // _default is any here, removing typeof Fs fixes this

Installing @types/fs-extra directly into the package (within my node_modules) fixes this. I would assume, then, that moving the types packages from devDependencies to dependencies would fix this permanently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.