pfade

0.3.0 • Public • Published

Pfade

This is a basic route normalizing library. It helps in avoiding relative paths.

Installation

    npm install pfade

Usage

Instead of using the relative paths

    require('../../something.js')

you can use

    var Pfade = require('pfade')
    var pfade = new Pfade(__dirname) // specify the absolute path to your project
    var index = pfade.require('index.js')
    var handle = pfade.require('modules/handle.js')
    console.log(handle)

This reduces the ugly relative path requires. After the first instantiation, you won't have to provide the absolute address of the project.

You can just instantiate

    var Pfade = require('pfade')
    var pfade = new Pfade()

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i pfade

      Weekly Downloads

      0

      Version

      0.3.0

      License

      MIT

      Last publish

      Collaborators

      • bat_coder