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

object-sizeof

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-sizeof - npm Package Compare versions

Comparing version 2.6.4 to 2.6.5

7

indexv2.js

@@ -5,3 +5,4 @@ // Copyright 2023 ChatGPT May 24 Version

const ECMA_SIZES = require('./byte_size')
const Buffer = require('buffer/').Buffer
const Buffer =
typeof window !== 'undefined' ? require('buffer/').Buffer : global.Buffer

@@ -76,4 +77,4 @@ /**

} catch (ex) {
console.error('Error detected, returning ' + errorIndication, ex)
return errorIndication
// do not log anyting to console.error
return new Error(errorIndication)
}

@@ -80,0 +81,0 @@

{
"name": "object-sizeof",
"version": "2.6.4",
"version": "2.6.5",
"description": "Sizeof of a JavaScript object in Bytes",

@@ -29,4 +29,4 @@ "main": "indexv2.js",

"codecov": "^3.8.3",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"mocha": "^10.6.0",
"nyc": "^17.0.0",
"should": "^13.2.3",

@@ -33,0 +33,0 @@ "standard": "^17.1.0"

@@ -14,3 +14,2 @@ 'use strict'

// add more tests here
it('should handle null in object keys', () => {

@@ -20,3 +19,3 @@ const badData = { 1: { depot_id: null, hierarchy_node_id: null } }

})
it('null is 0', () => {

@@ -23,0 +22,0 @@ sizeof(null).should.be.equal(0)

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