Socket
Socket
Sign inDemoInstall

hosted-git-info

Package Overview
Dependencies
0
Maintainers
6
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.8.2 to 2.8.3

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

<a name="2.8.3"></a>
## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12)
<a name="2.8.2"></a>

@@ -7,0 +12,0 @@ ## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05)

10

index.js

@@ -5,4 +5,2 @@ 'use strict'

var GitHost = module.exports = require('./git-host.js')
var LRU = require('lru-cache')
var cache = new LRU({max: 1000})

@@ -28,2 +26,4 @@ var protocolToRepresentationMap = {

var cache = {}
module.exports.fromUrl = function (giturl, opts) {

@@ -33,7 +33,7 @@ if (typeof giturl !== 'string') return

if (!cache.has(key)) {
cache.set(key, fromUrl(giturl, opts))
if (!(key in cache)) {
cache[key] = fromUrl(giturl, opts)
}
return cache.get(key)
return cache[key]
}

@@ -40,0 +40,0 @@

{
"name": "hosted-git-info",
"version": "2.8.2",
"version": "2.8.3",
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",

@@ -29,5 +29,2 @@ "main": "index.js",

},
"dependencies": {
"lru-cache": "^5.1.1"
},
"devDependencies": {

@@ -34,0 +31,0 @@ "standard": "^11.0.1",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc