0.0.1 • Published 3 years ago

@dupy/fs-model v0.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

FS Model

This resource allows you to manage the file with class who offer an easier scaling.

How to install it ?

The easier way it to install it via npm or yarn with the following command: npm install @dupy/fs-model (or yarn install @dupy/fs-model for yarn).

npm i @dupy/fs-model

More Scalable

FS Model will allows you to manage our file more faster and easer. For exemple, you can extends the File class to edit our JSON file such as like:

    import File from "@dupasj/fs-model/file";

    class Json extends File{
        value: any;

        setContent(content: string){
            super.setContent(content);

            this.value = JSON.parse(content);
            
            return this;
        }

        getValue(){
            return this.value;
        }
        hasValue(){
            return typeof this.value !== "undefined";        
        }
        setValue(value: any){
            super.setContent(JSON.stringify(value));
            this.value = value;

            return this;
        }
    }

Incoming features

  • Document the library
  • Add cache file system