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

cabal-core

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cabal-core - npm Package Compare versions

Comparing version 11.1.0 to 11.1.1

17

index.js

@@ -62,3 +62,3 @@ var kappa = require('kappa-core')

const uri = new URL(key)
this.key = sanitizeKey(uri.host)
this.key = sanitizeKey(key)
this.modKeys = uri.searchParams.getAll('mod')

@@ -259,3 +259,3 @@ this.adminKeys = uri.searchParams.getAll('admin')

function isHypercoreKey (key) {
if (typeof key === 'string') return /^[0-9a-f]{64}$/.test(key)
if (typeof key === 'string') return /^[0-9A-Fa-f]{64}$/.test(key)
else if (Buffer.isBuffer(key)) return key.length === 32

@@ -266,14 +266,7 @@ }

function sanitizeKey (key) {
// force to hex string
if (Buffer.isBuffer(key)) {
key = key.toString('hex')
}
// remove any protocol uri prefix
if (typeof key === 'string') key = key.replace(/^.*:\/\//, '')
else key = undefined
return key
const match = key.match(/^cabal:\/\/([0-9A-Fa-f]{64})/)
if (match === null) return undefined
return match[1]
}
function noop () {}
{
"name": "cabal-core",
"version": "11.1.0",
"version": "11.1.1",
"description": " p2p db functions for chat ",

@@ -5,0 +5,0 @@ "main": "index.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