Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pagedip/util-npm

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pagedip/util-npm - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

lib/index.js

@@ -235,2 +235,2 @@ /* eslint-disable */"use strict";

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJhcmdzIiwib3B0cyIsIkFycmF5IiwiaXNBcnJheSIsImJ1ZmZlciIsIm5wbUJpblBhdGgiLCJnbG9iYWxOcG1CaW4iLCJvcHRpb25zIiwiZnVsbEFyZ3MiLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCIsImNwIiwic3RkaW8iLCJvbiIsImNvZGUiLCJFcnJvciIsIm5wbUNvbW1hbmQiLCJnbG9iYWxOcG1Db25maWciLCJsb2FkZWQiLCJyIiwicmVzb2x2IiwibG9hZCIsImVyciIsImNvbmYiLCJwcmVmaXgiLCJldGMiLCJzIiwic3RhdCIsImlzRGlyZWN0b3J5Iiwicm1kaXIiLCJlIiwibG9hZE5wbUNvbmZpZyIsInJlZ2lzdHJ5IiwibmFtZSIsInJlcSIsInJlZ2lzdHJ5UmVxdWVzdCIsInJlcGxhY2UiLCJib2R5IiwicmVzcG9uc2UiLCJzdGF0dXMiLCJmZXRjaFBhY2thZ2VJbmZvIiwidGFncyIsImluZm8iLCJnZXRSZWxlYXNlIiwiZmV0Y2hSZWxlYXNlIiwibnBtSW5zdGFsbCIsIm5weENvbW1hbmQiLCJnZXRSZWdpc3RyeSIsInJlcXVpcmUiLCJnbG9iYWxOcHhCaW4iLCJwa2ciLCJucG1Db25maWciLCJmYWxsYmFjayIsInB1Ymxpc2hDb25maWciLCJzcGxpdCIsImdldCIsIm1ld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mVsZWFzZShyZWdpc3RyeSwgbmFtZSwgdGFncykge1xuICBjb25zdCBpbmZvID0gYXdhaXQgZmV0Y2hQYWNrYWdlSW5mbyhyZWdpc3RyeSwgbmFtZSk7XG4gIHJldHVybiBnZXRSZWxlYXNlKGluZm8sIHRhZ3MpO1xufVxuIl19
{
"name": "@pagedip/util-npm",
"version": "1.1.0",
"version": "1.1.1",
"public": true,

@@ -20,4 +20,4 @@ "author": "Tyler Johnson <tyler@beneaththeink.com>",

"mz": "^2.7.0",
"registry-auth-token": "^3.3.1",
"superagent": "^3.6.0"
"registry-auth-token": "^3.3.2",
"superagent": "^3.8.3"
},

@@ -32,3 +32,3 @@ "devDependencies": {

],
"gitHead": "61824d5a4a9328b56f9e64421f58fb4a52b012eb"
"gitHead": "6366495a48f008a7ab403fa822bca34af305b826"
}
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