Socket
Socket
Sign inDemoInstall

inside

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inside

require() relative to the path inside your module.


Version published
Weekly downloads
105K
increased by7.67%
Maintainers
1
Weekly downloads
 
Created

Readme

Source

node-self

require() relative to the path inside your module.

Installation

npm install --save inside

Usage:

var User = require('inside')('lib/models/user');

How does it work?

The first time node-self is called, it detects which file is calling it. It then traverses up the directory tree to find the first package.json. Then all calls to node-self will simply call require() relative to that directory.

FAQs

Package last updated on 03 Apr 2015

Did you know?

Socket

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc