Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ral

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ral

Path aliasing for require.

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
15
1400%
Maintainers
1
Weekly downloads
 
Created
Source

Require path aliasing.

Put require-paths.json in your root. And then use

// Will require in the value relative to the root
require('ral')('key');

For example with the require-paths.json of

{
   "constants" : "lib/constants"
}

You can use require('ral')('constants')

Then if the location of contatns changes, only require-paths.json needs to be updated.

Subpaths coming soon.

Keywords

paths

FAQs

Package last updated on 02 Jun 2014

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