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

package-lookup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-lookup - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

13

index.js

@@ -9,3 +9,8 @@ var pkg = exports;

function doCache(uncachedFiles, value) {
function doCache(uncachedFiles, pkgFile, value) {
if (pkgFile && value) {
value._filename = pkgFile;
value._dirname = path.dirname(pkgFile);
}
uncachedFiles.forEach(function(filename) {

@@ -32,3 +37,3 @@ cache[filename] = value;

if (pkgFile in cache) {
return doCache(uncached, cache[pkgFile]);
return doCache(uncached, pkgFile, cache[pkgFile]);
}

@@ -53,9 +58,9 @@

return doCache(uncached, pkgInfo || {});
return doCache(uncached, pkgFile, pkgInfo || {});
}
var parentDir = path.dirname(dir);
if (parentDir === dir) return doCache(uncached, null);
if (parentDir === dir) return doCache(uncached, null, null);
dir = parentDir;
}
};
{
"name" : "package-lookup",
"description" : "Info about the package given a filename.",
"version" : "0.1.0",
"version" : "0.1.1",
"author" : {

@@ -6,0 +6,0 @@ "name" : "Bjarke Walling",

@@ -24,1 +24,8 @@ package-lookup

```
Functions:
* pkg.resolve(filename)
* pkg.resolveDir(dirname)
The package info includes the properties `_filename` and `_dirname` that gives the filename and directory of the package.json file.
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