node-path-choice
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

node-path-choice

Get the path to the source directory and save it in env once.

Relative and absolute path are available.

Absolute: you can just set your path blatantly in process.env.NODE_PATH

Usage

    // put this in your index.js or app.js (just once in a project and that becomes root)
    require('node-path-choice').blatant(__dirname)

This should replace rootpath node_module in your repo.

rootpath() is waste of cpu cycles. Use this instead.

license

MIT

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i node-path-choice

    Weekly Downloads

    8

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    18.9 kB

    Total Files

    21

    Last publish

    Collaborators

    • iamanubhavsaini
    • git.faf