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

reference-map

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reference-map - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

.nyc_output/086bbaa1a5a48ccaf946cd649c3d46f6.json

4

index.js

@@ -18,2 +18,6 @@ module.exports = class ReferanceMap {

add (obj, type) {
if (!(obj !== null && typeof obj === 'object')) {
throw new Error(`invalid object "${obj}"`)
}
let ref = obj[this.intRefProp]

@@ -20,0 +24,0 @@ if (ref === undefined) {

6

package.json
{
"name": "reference-map",
"version": "1.2.6",
"version": "1.2.7",
"description": "This is a simple determinstic map that maps POJOs to an integer",

@@ -31,6 +31,6 @@ "main": "index.js",

"coveralls": "^3.0.0",
"nyc": "^11.4.1",
"standard": "^11.0.0",
"nyc": "^11.7.1",
"standard": "^11.0.1",
"tape": "^4.9.0"
}
}

@@ -76,3 +76,3 @@ const tape = require('tape')

tape('failures', t => {
t.plan(1)
t.plan(2)
const referanceMap = new ReferanceMap()

@@ -84,3 +84,9 @@ const buf = Buffer.from('hello')

t.deepEquals(referanceMap.get(ref), buf)
try {
referanceMap.add(1)
} catch (e) {
t.equal(e.toString(), 'Error: invalid object "1"')
}
t.end()
})
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