@0ti.me/en-path

An enhanced JS path module

Latest version: 0.1.0 registry icon
Maintenance score
0
Safety score
0
Popularity score
0
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.1.0 0 0 0 0 0

Stability
Latest release:

0.1.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

GPL-3.0   -   GNU General Public License v3.0 only

Not a wildcard

Not proprietary

OSI Compliant



en-path

srelative

// This fails because the path ends up being 'module.js' which require will interpret as an npm dependency instead of a file path
const path = require('path');
const module = require(path.relative(__dirname, 'module.js'));

An enhanced path module that adds a srelative function that ensures all paths are usable by require. You can see it in action here:

const enPath = require('en-path');
const module = require(enPath.srelative(__dirname, 'module.js'));