New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

p2r

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p2r - npm Package Compare versions

Comparing version 0.3.0 to 0.5.0

14

lib.js

@@ -7,7 +7,9 @@ /**

_getPath = exports.path = function(name){
return path.join(__dirname, '../../', name)
var rootPath = path.join(__dirname, '../../');
_getPath = exports.path = function (name) {
return path.join(rootPath, name);
};
exports._ = function(name){
exports._ = function (name) {
console.warn("p2r._ will be deleted, please use p2r.path.");

@@ -17,6 +19,10 @@ return _getPath(name);

exports.require = function(name){
exports.require = function (name) {
return require(_getPath(name))
};
exports.setRoot = function (p) {
rootPath = p;
};
exports.path = _getPath;
{
"name": "p2r",
"version": "0.3.0",
"version": "0.5.0",
"description": "get path relative to project dir",

@@ -5,0 +5,0 @@ "main": "lib.js",

@@ -10,2 +10,4 @@ ##path-2-root

npm install p2r
*Note: you must not install this package globally!*

@@ -12,0 +14,0 @@ ###Example

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc