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 1.1.0 to 1.1.1

3

index.js

@@ -21,3 +21,4 @@ // Copyright 2014 Andrei Karpushonak

for (var key in object) {
if (!object.hasOwnProperty(key)) {
if(!Object.hasOwnProperty.call(object, key)) {
continue;

@@ -24,0 +25,0 @@ }

{
"name": "object-sizeof",
"version": "1.1.0",
"description": "Sizeof of a JavaScript object in bytes",
"version": "1.1.1",
"description": "Sizeof of a JavaScript object in Bytes",
"main": "index.js",

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

@@ -12,5 +12,3 @@ "use strict";

var badData = {"1":{"depot_id":null,"hierarchy_node_id":null}};
console.log('size', sizeof(badData));
sizeof(badData);
isNaN(sizeof(badData)).should.be.equal(false);
sizeof(badData).should.be.instanceOf(Number);
});

@@ -70,2 +68,8 @@

it('handle hasOwnProperty key', function() {
sizeof({hasOwnProperty: undefined}).should.be.instanceOf(Number);
sizeof({hasOwnProperty: 'Hello World'}).should.be.instanceOf(Number);
sizeof({hasOwnProperty: 1234}).should.be.instanceOf(Number);
});
});

Sorry, the diff of this file is not supported yet

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