object-sizeof
Advanced tools
Comparing version 2.6.4 to 2.6.5
@@ -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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17827