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.1.0 to 0.2.0

11

lib.js

@@ -7,4 +7,13 @@ /**

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

2

package.json
{
"name": "p2r",
"version": "0.1.0",
"version": "0.2.0",
"description": "get path relative to project dir",

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

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

[![NPM](https://nodei.co/npm/p2r.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/p2r/)
###Install

@@ -21,2 +23,7 @@

var p2r = require('p2r');
var lib = require(p2r._('config.js'));
var lib = require(p2r.path('config.js'));
Or:
var p2r = require('p2r');
var lib = p2r.require('config.js');
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