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

bipf

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bipf - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

2

index.js

@@ -160,2 +160,4 @@ var varint = require('varint')

var type = getType(value)
if ('function' !== typeof encodingLengthers[type])
throw new Error('unknown type:' + type + ', ' + JSON.stringify(value))
var len = encodingLengthers[type](value)

@@ -162,0 +164,0 @@ return varint.encodingLength(len << TAG_SIZE) + len

2

package.json
{
"name": "bipf",
"description": "binary in-place format",
"version": "1.5.3",
"version": "1.5.4",
"homepage": "https://github.com/ssbc/bipf",

@@ -6,0 +6,0 @@ "repository": {

const tape = require('tape')
const bipf = require('../')
const pkg = require('../package.json')
const pkg = {
name: 'test',
version: '1.0.0',
description: 'test package',
repository: {
type: 'git',
url: 'git://github.com/ssbc/bipf.git',
},
dependencies: {
varint: '^5.0.0',
},
husky: {
hooks: {
'pre-commit': 'npm run format-code-staged',
},
},
}
/*

@@ -49,2 +66,5 @@ json types:

testEncodeDecode(-1)
testEncodeDecode(-100)
testEncodeDecode(123.456)
testEncodeDecode(-123.456)
testEncodeDecode(true)

@@ -60,2 +80,25 @@ testEncodeDecode(false)

testEncodeDecode('hello')
testEncodeDecode(
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_' +
'123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_'
)
testEncodeDecode({ foo: true })

@@ -104,2 +147,7 @@ testEncodeDecode([-1, { foo: true }, Buffer.from('deadbeef', 'hex')])

tape('error: encode(NaN)', (t) => {
t.throws(() => bipf.encode(NaN), /unknown type/)
t.end()
})
tape('seekKey() on an object', (t) => {

@@ -106,0 +154,0 @@ const objEncoded = bipf.allocAndEncode({ x: 10, y: 20 })

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