Socket
Socket
Sign inDemoInstall

node-path

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-path

Extends module paths with process.mainModule paths


Version published
Weekly downloads
274
increased by13.22%
Maintainers
1
Install size
1.65 kB
Created
Weekly downloads
 

Readme

Source

node-path

This is module is a simple hack to allow old require.paths deprecated method.

Install

$ npm install node-path

Usage

// On process.mainModule; eg: node index.js
require('node-path')(module, ['../libs', '../vendor']);

// On a child module
require('node-path')(module);

var myLib = require('my-lib-in-libs');
var myVendor = require('my-vendor-in-vendors');

Todo

  • Add some tests
  • Improve extend method

Licence

MIT

Keywords

FAQs

Last updated on 19 Oct 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc